rust/tests/rustdoc-json/attrs/non_exhaustive.rs
Alona Enraght-Moony 7ab71c417b tests/rustdoc-json: replace $.index[*][? with $.index[?
Done automatically with VSCode.
2025-03-21 00:48:09 +00:00

20 lines
406 B
Rust

#![no_std]
//@ is "$.index[?(@.name=='MyEnum')].attrs" '["#[non_exhaustive]"]'
#[non_exhaustive]
pub enum MyEnum {
First,
}
pub enum NonExhaustiveVariant {
//@ is "$.index[?(@.name=='Variant')].attrs" '["#[non_exhaustive]"]'
#[non_exhaustive]
Variant(i64),
}
//@ is "$.index[?(@.name=='MyStruct')].attrs" '["#[non_exhaustive]"]'
#[non_exhaustive]
pub struct MyStruct {
pub x: i64,
}