diff options
Diffstat (limited to 'src/test/rustdoc-json/enums')
16 files changed, 0 insertions, 357 deletions
diff --git a/src/test/rustdoc-json/enums/auxiliary/color.rs b/src/test/rustdoc-json/enums/auxiliary/color.rs deleted file mode 100644 index 7188f7938..000000000 --- a/src/test/rustdoc-json/enums/auxiliary/color.rs +++ /dev/null @@ -1,5 +0,0 @@ -pub enum Color { - Red, - Green, - Blue, -} diff --git a/src/test/rustdoc-json/enums/discriminant/basic.rs b/src/test/rustdoc-json/enums/discriminant/basic.rs deleted file mode 100644 index 8c221615a..000000000 --- a/src/test/rustdoc-json/enums/discriminant/basic.rs +++ /dev/null @@ -1,12 +0,0 @@ -#[repr(i8)] -pub enum Ordering { - // @is "$.index[*][?(@.name=='Less')].inner.variant_inner.expr" '"-1"' - // @is "$.index[*][?(@.name=='Less')].inner.variant_inner.value" '"-1"' - Less = -1, - // @is "$.index[*][?(@.name=='Equal')].inner.variant_inner.expr" '"0"' - // @is "$.index[*][?(@.name=='Equal')].inner.variant_inner.value" '"0"' - Equal = 0, - // @is "$.index[*][?(@.name=='Greater')].inner.variant_inner.expr" '"1"' - // @is "$.index[*][?(@.name=='Greater')].inner.variant_inner.value" '"1"' - Greater = 1, -} diff --git a/src/test/rustdoc-json/enums/discriminant/expr.rs b/src/test/rustdoc-json/enums/discriminant/expr.rs deleted file mode 100644 index 235b0b473..000000000 --- a/src/test/rustdoc-json/enums/discriminant/expr.rs +++ /dev/null @@ -1,39 +0,0 @@ -pub enum Foo { - // @is "$.index[*][?(@.name=='Addition')].inner.variant_inner.value" '"0"' - // @is "$.index[*][?(@.name=='Addition')].inner.variant_inner.expr" '"{ _ }"' - Addition = 0 + 0, - // @is "$.index[*][?(@.name=='Bin')].inner.variant_inner.value" '"1"' - // @is "$.index[*][?(@.name=='Bin')].inner.variant_inner.expr" '"0b1"' - Bin = 0b1, - // @is "$.index[*][?(@.name=='Oct')].inner.variant_inner.value" '"2"' - // @is "$.index[*][?(@.name=='Oct')].inner.variant_inner.expr" '"0o2"' - Oct = 0o2, - // @is "$.index[*][?(@.name=='PubConst')].inner.variant_inner.value" '"3"' - // @is "$.index[*][?(@.name=='PubConst')].inner.variant_inner.expr" '"THREE"' - PubConst = THREE, - // @is "$.index[*][?(@.name=='Hex')].inner.variant_inner.value" '"4"' - // @is "$.index[*][?(@.name=='Hex')].inner.variant_inner.expr" '"0x4"' - Hex = 0x4, - // @is "$.index[*][?(@.name=='Cast')].inner.variant_inner.value" '"5"' - // @is "$.index[*][?(@.name=='Cast')].inner.variant_inner.expr" '"{ _ }"' - Cast = 5 as isize, - // @is "$.index[*][?(@.name=='PubCall')].inner.variant_inner.value" '"6"' - // @is "$.index[*][?(@.name=='PubCall')].inner.variant_inner.expr" '"{ _ }"' - PubCall = six(), - // @is "$.index[*][?(@.name=='PrivCall')].inner.variant_inner.value" '"7"' - // @is "$.index[*][?(@.name=='PrivCall')].inner.variant_inner.expr" '"{ _ }"' - PrivCall = seven(), - // @is "$.index[*][?(@.name=='PrivConst')].inner.variant_inner.value" '"8"' - // @is "$.index[*][?(@.name=='PrivConst')].inner.variant_inner.expr" '"EIGHT"' - PrivConst = EIGHT, -} - -pub const THREE: isize = 3; -const EIGHT: isize = 8; - -pub const fn six() -> isize { - 6 -} -const fn seven() -> isize { - 7 -} diff --git a/src/test/rustdoc-json/enums/discriminant/limits.rs b/src/test/rustdoc-json/enums/discriminant/limits.rs deleted file mode 100644 index 8df73d78d..000000000 --- a/src/test/rustdoc-json/enums/discriminant/limits.rs +++ /dev/null @@ -1,43 +0,0 @@ -// ignore-tidy-linelength -#![feature(repr128)] -#![allow(incomplete_features)] - -#[repr(u64)] -pub enum U64 { - // @is "$.index[*][?(@.name=='U64Min')].inner.variant_inner.value" '"0"' - // @is "$.index[*][?(@.name=='U64Min')].inner.variant_inner.expr" '"u64::MIN"' - U64Min = u64::MIN, - // @is "$.index[*][?(@.name=='U64Max')].inner.variant_inner.value" '"18446744073709551615"' - // @is "$.index[*][?(@.name=='U64Max')].inner.variant_inner.expr" '"u64::MAX"' - U64Max = u64::MAX, -} - -#[repr(i64)] -pub enum I64 { - // @is "$.index[*][?(@.name=='I64Min')].inner.variant_inner.value" '"-9223372036854775808"' - // @is "$.index[*][?(@.name=='I64Min')].inner.variant_inner.expr" '"i64::MIN"' - I64Min = i64::MIN, - // @is "$.index[*][?(@.name=='I64Max')].inner.variant_inner.value" '"9223372036854775807"' - // @is "$.index[*][?(@.name=='I64Max')].inner.variant_inner.expr" '"i64::MAX"' - I64Max = i64::MAX, -} - -#[repr(u128)] -pub enum U128 { - // @is "$.index[*][?(@.name=='U128Min')].inner.variant_inner.value" '"0"' - // @is "$.index[*][?(@.name=='U128Min')].inner.variant_inner.expr" '"u128::MIN"' - U128Min = u128::MIN, - // @is "$.index[*][?(@.name=='U128Max')].inner.variant_inner.value" '"340282366920938463463374607431768211455"' - // @is "$.index[*][?(@.name=='U128Max')].inner.variant_inner.expr" '"u128::MAX"' - U128Max = u128::MAX, -} - -#[repr(i128)] -pub enum I128 { - // @is "$.index[*][?(@.name=='I128Min')].inner.variant_inner.value" '"-170141183460469231731687303715884105728"' - // @is "$.index[*][?(@.name=='I128Min')].inner.variant_inner.expr" '"i128::MIN"' - I128Min = i128::MIN, - // @is "$.index[*][?(@.name=='I128Max')].inner.variant_inner.value" '"170141183460469231731687303715884105727"' - // @is "$.index[*][?(@.name=='I128Max')].inner.variant_inner.expr" '"i128::MAX"' - I128Max = i128::MAX, -} diff --git a/src/test/rustdoc-json/enums/discriminant/num_underscore_and_suffix.rs b/src/test/rustdoc-json/enums/discriminant/num_underscore_and_suffix.rs deleted file mode 100644 index 3417baa07..000000000 --- a/src/test/rustdoc-json/enums/discriminant/num_underscore_and_suffix.rs +++ /dev/null @@ -1,15 +0,0 @@ -#[repr(u32)] -pub enum Foo { - // @is "$.index[*][?(@.name=='Basic')].inner.variant_inner.value" '"0"' - // @is "$.index[*][?(@.name=='Basic')].inner.variant_inner.expr" '"0"' - Basic = 0, - // @is "$.index[*][?(@.name=='Suffix')].inner.variant_inner.value" '"10"' - // @is "$.index[*][?(@.name=='Suffix')].inner.variant_inner.expr" '"10u32"' - Suffix = 10u32, - // @is "$.index[*][?(@.name=='Underscore')].inner.variant_inner.value" '"100"' - // @is "$.index[*][?(@.name=='Underscore')].inner.variant_inner.expr" '"1_0_0"' - Underscore = 1_0_0, - // @is "$.index[*][?(@.name=='SuffixUnderscore')].inner.variant_inner.value" '"1000"' - // @is "$.index[*][?(@.name=='SuffixUnderscore')].inner.variant_inner.expr" '"1_0_0_0u32"' - SuffixUnderscore = 1_0_0_0u32, -} diff --git a/src/test/rustdoc-json/enums/discriminant/only_some_have_discriminant.rs b/src/test/rustdoc-json/enums/discriminant/only_some_have_discriminant.rs deleted file mode 100644 index 6af944a22..000000000 --- a/src/test/rustdoc-json/enums/discriminant/only_some_have_discriminant.rs +++ /dev/null @@ -1,10 +0,0 @@ -pub enum Foo { - // @is "$.index[*][?(@.name=='Has')].inner.variant_inner" '{"expr":"0", "value":"0"}' - Has = 0, - // @is "$.index[*][?(@.name=='Doesnt')].inner.variant_inner" null - Doesnt, - // @is "$.index[*][?(@.name=='AlsoDoesnt')].inner.variant_inner" null - AlsoDoesnt, - // @is "$.index[*][?(@.name=='AlsoHas')].inner.variant_inner" '{"expr":"44", "value":"44"}' - AlsoHas = 44, -} diff --git a/src/test/rustdoc-json/enums/doc_link_to_foreign_variant.rs b/src/test/rustdoc-json/enums/doc_link_to_foreign_variant.rs deleted file mode 100644 index 470b195a2..000000000 --- a/src/test/rustdoc-json/enums/doc_link_to_foreign_variant.rs +++ /dev/null @@ -1,11 +0,0 @@ -// aux-build: color.rs - -//! The purpose of this test it to have a link to [a foreign variant](Red). - -extern crate color; -use color::Color::Red; - -// @set red = "$.index[*][?(@.inner.is_crate == true)].links.Red" - -// @!has "$.index[*][?(@.name == 'Red')]" -// @!has "$.index[*][?(@.name == 'Color')]" diff --git a/src/test/rustdoc-json/enums/field_hidden.rs b/src/test/rustdoc-json/enums/field_hidden.rs deleted file mode 100644 index e6310cc3b..000000000 --- a/src/test/rustdoc-json/enums/field_hidden.rs +++ /dev/null @@ -1,13 +0,0 @@ -// Regression test for <https://github.com/rust-lang/rust/issues/100529>. - -#![no_core] -#![feature(no_core)] - -// @has "$.index[*][?(@.name=='ParseError')]" -// @has "$.index[*][?(@.name=='UnexpectedEndTag')]" -// @is "$.index[*][?(@.name=='UnexpectedEndTag')].inner.variant_kind" '"tuple"' -// @is "$.index[*][?(@.name=='UnexpectedEndTag')].inner.variant_inner" [null] - -pub enum ParseError { - UnexpectedEndTag(#[doc(hidden)] u32), -} diff --git a/src/test/rustdoc-json/enums/kind.rs b/src/test/rustdoc-json/enums/kind.rs deleted file mode 100644 index e9ea3ae23..000000000 --- a/src/test/rustdoc-json/enums/kind.rs +++ /dev/null @@ -1,37 +0,0 @@ -// ignore-tidy-linelength - -#![feature(no_core)] -#![no_core] - -pub enum Foo { - // @set Unit = "$.index[*][?(@.name=='Unit')].id" - // @is "$.index[*][?(@.name=='Unit')].inner.variant_kind" '"plain"' - // @is "$.index[*][?(@.name=='Unit')].inner.variant_inner" null - Unit, - // @set Named = "$.index[*][?(@.name=='Named')].id" - // @is "$.index[*][?(@.name=='Named')].inner.variant_kind" '"struct"' - // @is "$.index[*][?(@.name=='Named')].inner.variant_inner" '{"fields": [], "fields_stripped": false}' - Named {}, - // @set Tuple = "$.index[*][?(@.name=='Tuple')].id" - // @is "$.index[*][?(@.name=='Tuple')].inner.variant_kind" '"tuple"' - // @is "$.index[*][?(@.name=='Tuple')].inner.variant_inner" [] - Tuple(), - // @set NamedField = "$.index[*][?(@.name=='NamedField')].id" - // @set x = "$.index[*][?(@.name=='x' && @.kind=='struct_field')].id" - // @is "$.index[*][?(@.name=='NamedField')].inner.variant_kind" '"struct"' - // @is "$.index[*][?(@.name=='NamedField')].inner.variant_inner.fields[*]" $x - // @is "$.index[*][?(@.name=='NamedField')].inner.variant_inner.fields_stripped" false - NamedField { x: i32 }, - // @set TupleField = "$.index[*][?(@.name=='TupleField')].id" - // @is "$.index[*][?(@.name=='TupleField')].inner.variant_kind" '"tuple"' - // @set tup_field = "$.index[*][?(@.name=='0' && @.kind=='struct_field')].id" - // @is "$.index[*][?(@.name=='TupleField')].inner.variant_inner[*]" $tup_field - TupleField(i32), -} - -// @is "$.index[*][?(@.name=='Foo')].inner.variants[0]" $Unit -// @is "$.index[*][?(@.name=='Foo')].inner.variants[1]" $Named -// @is "$.index[*][?(@.name=='Foo')].inner.variants[2]" $Tuple -// @is "$.index[*][?(@.name=='Foo')].inner.variants[3]" $NamedField -// @is "$.index[*][?(@.name=='Foo')].inner.variants[4]" $TupleField -// @count "$.index[*][?(@.name=='Foo')].inner.variants[*]" 5 diff --git a/src/test/rustdoc-json/enums/struct_field_hidden.rs b/src/test/rustdoc-json/enums/struct_field_hidden.rs deleted file mode 100644 index f612a34a4..000000000 --- a/src/test/rustdoc-json/enums/struct_field_hidden.rs +++ /dev/null @@ -1,17 +0,0 @@ -pub enum Foo { - Variant { - #[doc(hidden)] - a: i32, - // @set b = "$.index[*][?(@.name=='b')].id" - b: i32, - #[doc(hidden)] - x: i32, - // @set y = "$.index[*][?(@.name=='y')].id" - y: i32, - }, - // @is "$.index[*][?(@.name=='Variant')].inner.variant_kind" '"struct"' - // @is "$.index[*][?(@.name=='Variant')].inner.variant_inner.fields_stripped" true - // @is "$.index[*][?(@.name=='Variant')].inner.variant_inner.fields[0]" $b - // @is "$.index[*][?(@.name=='Variant')].inner.variant_inner.fields[1]" $y - // @count "$.index[*][?(@.name=='Variant')].inner.variant_inner.fields[*]" 2 -} diff --git a/src/test/rustdoc-json/enums/tuple_fields_hidden.rs b/src/test/rustdoc-json/enums/tuple_fields_hidden.rs deleted file mode 100644 index f546eaa0d..000000000 --- a/src/test/rustdoc-json/enums/tuple_fields_hidden.rs +++ /dev/null @@ -1,94 +0,0 @@ -#![feature(no_core)] -#![no_core] - -// @set 1.1.0 = "$.index[*][?(@.docs=='1.1.0')].id" -// @set 2.1.0 = "$.index[*][?(@.docs=='2.1.0')].id" -// @set 2.1.1 = "$.index[*][?(@.docs=='2.1.1')].id" -// @set 2.2.1 = "$.index[*][?(@.docs=='2.2.1')].id" -// @set 2.3.0 = "$.index[*][?(@.docs=='2.3.0')].id" -// @set 3.1.1 = "$.index[*][?(@.docs=='3.1.1')].id" -// @set 3.1.2 = "$.index[*][?(@.docs=='3.1.2')].id" -// @set 3.2.0 = "$.index[*][?(@.docs=='3.2.0')].id" -// @set 3.2.2 = "$.index[*][?(@.docs=='3.2.2')].id" -// @set 3.3.0 = "$.index[*][?(@.docs=='3.3.0')].id" -// @set 3.3.1 = "$.index[*][?(@.docs=='3.3.1')].id" - -pub enum EnumWithStrippedTupleVariants { - // @is "$.index[*][?(@.name=='None')].inner.variant_kind" '"tuple"' - // @count "$.index[*][?(@.name=='None')].inner.variant_inner[*]" 0 - None(), - - // @is "$.index[*][?(@.name=='One')].inner.variant_kind" '"tuple"' - // @count "$.index[*][?(@.name=='One')].inner.variant_inner[*]" 1 - // @is "$.index[*][?(@.name=='One')].inner.variant_inner[0]" $1.1.0 - One(/** 1.1.0*/ bool), - // @is "$.index[*][?(@.name=='OneHidden')].inner.variant_kind" '"tuple"' - // @count "$.index[*][?(@.name=='OneHidden')].inner.variant_inner[*]" 1 - // @is "$.index[*][?(@.name=='OneHidden')].inner.variant_inner[0]" null - OneHidden(#[doc(hidden)] bool), - - // @is "$.index[*][?(@.name=='Two')].inner.variant_kind" '"tuple"' - // @count "$.index[*][?(@.name=='Two')].inner.variant_inner[*]" 2 - // @is "$.index[*][?(@.name=='Two')].inner.variant_inner[0]" $2.1.0 - // @is "$.index[*][?(@.name=='Two')].inner.variant_inner[1]" $2.1.1 - Two(/** 2.1.0*/ bool, /** 2.1.1*/ bool), - // @is "$.index[*][?(@.name=='TwoLeftHidden')].inner.variant_kind" '"tuple"' - // @count "$.index[*][?(@.name=='TwoLeftHidden')].inner.variant_inner[*]" 2 - // @is "$.index[*][?(@.name=='TwoLeftHidden')].inner.variant_inner[0]" null - // @is "$.index[*][?(@.name=='TwoLeftHidden')].inner.variant_inner[1]" $2.2.1 - TwoLeftHidden(#[doc(hidden)] bool, /** 2.2.1*/ bool), - // @is "$.index[*][?(@.name=='TwoRightHidden')].inner.variant_kind" '"tuple"' - // @count "$.index[*][?(@.name=='TwoRightHidden')].inner.variant_inner[*]" 2 - // @is "$.index[*][?(@.name=='TwoRightHidden')].inner.variant_inner[0]" $2.3.0 - // @is "$.index[*][?(@.name=='TwoRightHidden')].inner.variant_inner[1]" null - TwoRightHidden(/** 2.3.0*/ bool, #[doc(hidden)] bool), - // @is "$.index[*][?(@.name=='TwoBothHidden')].inner.variant_kind" '"tuple"' - // @count "$.index[*][?(@.name=='TwoBothHidden')].inner.variant_inner[*]" 2 - // @is "$.index[*][?(@.name=='TwoBothHidden')].inner.variant_inner[0]" null - // @is "$.index[*][?(@.name=='TwoBothHidden')].inner.variant_inner[1]" null - TwoBothHidden(#[doc(hidden)] bool, #[doc(hidden)] bool), - - // @is "$.index[*][?(@.name=='Three1')].inner.variant_kind" '"tuple"' - // @count "$.index[*][?(@.name=='Three1')].inner.variant_inner[*]" 3 - // @is "$.index[*][?(@.name=='Three1')].inner.variant_inner[0]" null - // @is "$.index[*][?(@.name=='Three1')].inner.variant_inner[1]" $3.1.1 - // @is "$.index[*][?(@.name=='Three1')].inner.variant_inner[2]" $3.1.2 - Three1(#[doc(hidden)] bool, /** 3.1.1*/ bool, /** 3.1.2*/ bool), - // @is "$.index[*][?(@.name=='Three2')].inner.variant_kind" '"tuple"' - // @count "$.index[*][?(@.name=='Three2')].inner.variant_inner[*]" 3 - // @is "$.index[*][?(@.name=='Three2')].inner.variant_inner[0]" $3.2.0 - // @is "$.index[*][?(@.name=='Three2')].inner.variant_inner[1]" null - // @is "$.index[*][?(@.name=='Three2')].inner.variant_inner[2]" $3.2.2 - Three2(/** 3.2.0*/ bool, #[doc(hidden)] bool, /** 3.2.2*/ bool), - // @is "$.index[*][?(@.name=='Three3')].inner.variant_kind" '"tuple"' - // @count "$.index[*][?(@.name=='Three3')].inner.variant_inner[*]" 3 - // @is "$.index[*][?(@.name=='Three3')].inner.variant_inner[0]" $3.3.0 - // @is "$.index[*][?(@.name=='Three3')].inner.variant_inner[1]" $3.3.1 - // @is "$.index[*][?(@.name=='Three3')].inner.variant_inner[2]" null - Three3(/** 3.3.0*/ bool, /** 3.3.1*/ bool, #[doc(hidden)] bool), -} - - -// @is "$.index[*][?(@.docs=='1.1.0')].name" '"0"' -// @is "$.index[*][?(@.docs=='2.1.0')].name" '"0"' -// @is "$.index[*][?(@.docs=='2.1.1')].name" '"1"' -// @is "$.index[*][?(@.docs=='2.2.1')].name" '"1"' -// @is "$.index[*][?(@.docs=='2.3.0')].name" '"0"' -// @is "$.index[*][?(@.docs=='3.1.1')].name" '"1"' -// @is "$.index[*][?(@.docs=='3.1.2')].name" '"2"' -// @is "$.index[*][?(@.docs=='3.2.0')].name" '"0"' -// @is "$.index[*][?(@.docs=='3.2.2')].name" '"2"' -// @is "$.index[*][?(@.docs=='3.3.0')].name" '"0"' -// @is "$.index[*][?(@.docs=='3.3.1')].name" '"1"' - -// @is "$.index[*][?(@.docs=='1.1.0')].inner" '{"kind": "primitive", "inner": "bool"}' -// @is "$.index[*][?(@.docs=='2.1.0')].inner" '{"kind": "primitive", "inner": "bool"}' -// @is "$.index[*][?(@.docs=='2.1.1')].inner" '{"kind": "primitive", "inner": "bool"}' -// @is "$.index[*][?(@.docs=='2.2.1')].inner" '{"kind": "primitive", "inner": "bool"}' -// @is "$.index[*][?(@.docs=='2.3.0')].inner" '{"kind": "primitive", "inner": "bool"}' -// @is "$.index[*][?(@.docs=='3.1.1')].inner" '{"kind": "primitive", "inner": "bool"}' -// @is "$.index[*][?(@.docs=='3.1.2')].inner" '{"kind": "primitive", "inner": "bool"}' -// @is "$.index[*][?(@.docs=='3.2.0')].inner" '{"kind": "primitive", "inner": "bool"}' -// @is "$.index[*][?(@.docs=='3.2.2')].inner" '{"kind": "primitive", "inner": "bool"}' -// @is "$.index[*][?(@.docs=='3.3.0')].inner" '{"kind": "primitive", "inner": "bool"}' -// @is "$.index[*][?(@.docs=='3.3.1')].inner" '{"kind": "primitive", "inner": "bool"}' diff --git a/src/test/rustdoc-json/enums/use_glob.rs b/src/test/rustdoc-json/enums/use_glob.rs deleted file mode 100644 index 62b8b832a..000000000 --- a/src/test/rustdoc-json/enums/use_glob.rs +++ /dev/null @@ -1,18 +0,0 @@ -// Regression test for <https://github.com/rust-lang/rust/issues/104942> - -#![feature(no_core)] -#![no_core] - -// @set Color = "$.index[*][?(@.name == 'Color')].id" -pub enum Color { - Red, - Green, - Blue, -} - -// @set use_Color = "$.index[*][?(@.kind == 'import')].id" -// @is "$.index[*][?(@.kind == 'import')].inner.id" $Color -// @is "$.index[*][?(@.kind == 'import')].inner.glob" true -pub use Color::*; - -// @ismany "$.index[*][?(@.name == 'use_glob')].inner.items[*]" $Color $use_Color diff --git a/src/test/rustdoc-json/enums/use_variant.rs b/src/test/rustdoc-json/enums/use_variant.rs deleted file mode 100644 index 5f0d2b9b1..000000000 --- a/src/test/rustdoc-json/enums/use_variant.rs +++ /dev/null @@ -1,15 +0,0 @@ -#![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 diff --git a/src/test/rustdoc-json/enums/use_variant_foreign.rs b/src/test/rustdoc-json/enums/use_variant_foreign.rs deleted file mode 100644 index 11bb6ce1f..000000000 --- a/src/test/rustdoc-json/enums/use_variant_foreign.rs +++ /dev/null @@ -1,9 +0,0 @@ -// aux-build: color.rs - -extern crate color; - -// @is "$.index[*][?(@.inner.name == 'Red')].kind" '"import"' -pub use color::Color::Red; - -// @!has "$.index[*][?(@.name == 'Red')]" -// @!has "$.index[*][?(@.name == 'Color')]" diff --git a/src/test/rustdoc-json/enums/variant_struct.rs b/src/test/rustdoc-json/enums/variant_struct.rs deleted file mode 100644 index 23b854d8d..000000000 --- a/src/test/rustdoc-json/enums/variant_struct.rs +++ /dev/null @@ -1,11 +0,0 @@ -// @is "$.index[*][?(@.name=='EnumStruct')].visibility" \"public\" -// @is "$.index[*][?(@.name=='EnumStruct')].kind" \"enum\" -pub enum EnumStruct { - // @is "$.index[*][?(@.name=='VariantS')].inner.variant_kind" \"struct\" - // @is "$.index[*][?(@.name=='x')].kind" \"struct_field\" - // @is "$.index[*][?(@.name=='y')].kind" \"struct_field\" - VariantS { - x: u32, - y: String, - }, -} diff --git a/src/test/rustdoc-json/enums/variant_tuple_struct.rs b/src/test/rustdoc-json/enums/variant_tuple_struct.rs deleted file mode 100644 index b71ec47a8..000000000 --- a/src/test/rustdoc-json/enums/variant_tuple_struct.rs +++ /dev/null @@ -1,8 +0,0 @@ -// @is "$.index[*][?(@.name=='EnumTupleStruct')].visibility" \"public\" -// @is "$.index[*][?(@.name=='EnumTupleStruct')].kind" \"enum\" -pub enum EnumTupleStruct { - // @is "$.index[*][?(@.name=='VariantA')].inner.variant_kind" \"tuple\" - // @is "$.index[*][?(@.name=='0')].kind" \"struct_field\" - // @is "$.index[*][?(@.name=='1')].kind" \"struct_field\" - VariantA(u32, String), -} |