diff options
Diffstat (limited to 'tests/rustdoc-json/enums/use_variant.rs')
-rw-r--r-- | tests/rustdoc-json/enums/use_variant.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/rustdoc-json/enums/use_variant.rs b/tests/rustdoc-json/enums/use_variant.rs new file mode 100644 index 000000000..5f0d2b9b1 --- /dev/null +++ b/tests/rustdoc-json/enums/use_variant.rs @@ -0,0 +1,15 @@ +#![feature(no_core)] +#![no_core] + +// @set AlwaysNone = "$.index[*][?(@.name == 'AlwaysNone')].id" +pub enum AlwaysNone { + // @set None = "$.index[*][?(@.name == 'None')].id" + None, +} +// @is "$.index[*][?(@.name == 'AlwaysNone')].inner.variants[*]" $None + +// @set use_None = "$.index[*][?(@.kind == 'import')].id" +// @is "$.index[*][?(@.kind == 'import')].inner.id" $None +pub use AlwaysNone::None; + +// @ismany "$.index[*][?(@.name == 'use_variant')].inner.items[*]" $AlwaysNone $use_None |