mirror of https://github.com/rust-lang/rust.git
Update all rustdoc-json/ tests to use the new style
This commit is contained in:
parent
25be41cfb8
commit
633f41de09
|
@ -3,32 +3,32 @@
|
||||||
pub struct Simple;
|
pub struct Simple;
|
||||||
|
|
||||||
impl Simple {
|
impl Simple {
|
||||||
// @has "$.index[*][?(@.name=='CONSTANT')].inner.assoc_const"
|
//@ has "$.index[*][?(@.name=='CONSTANT')].inner.assoc_const"
|
||||||
pub const CONSTANT: usize = 0;
|
pub const CONSTANT: usize = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait EasyToImpl {
|
pub trait EasyToImpl {
|
||||||
// @has "$.index[*][?(@.docs=='ToDeclare trait')].inner.assoc_type"
|
//@ has "$.index[*][?(@.docs=='ToDeclare trait')].inner.assoc_type"
|
||||||
// @is "$.index[*][?(@.docs=='ToDeclare trait')].inner.assoc_type.default" null
|
//@ is "$.index[*][?(@.docs=='ToDeclare trait')].inner.assoc_type.default" null
|
||||||
// @is "$.index[*][?(@.docs=='ToDeclare trait')].inner.assoc_type.bounds" []
|
//@ is "$.index[*][?(@.docs=='ToDeclare trait')].inner.assoc_type.bounds" []
|
||||||
/// ToDeclare trait
|
/// ToDeclare trait
|
||||||
type ToDeclare;
|
type ToDeclare;
|
||||||
// @has "$.index[*][?(@.docs=='AN_ATTRIBUTE trait')].inner.assoc_const"
|
//@ has "$.index[*][?(@.docs=='AN_ATTRIBUTE trait')].inner.assoc_const"
|
||||||
// @is "$.index[*][?(@.docs=='AN_ATTRIBUTE trait')].inner.assoc_const.default" null
|
//@ is "$.index[*][?(@.docs=='AN_ATTRIBUTE trait')].inner.assoc_const.default" null
|
||||||
// @is "$.index[*][?(@.docs=='AN_ATTRIBUTE trait')].inner.assoc_const.type.primitive" '"usize"'
|
//@ is "$.index[*][?(@.docs=='AN_ATTRIBUTE trait')].inner.assoc_const.type.primitive" '"usize"'
|
||||||
/// AN_ATTRIBUTE trait
|
/// AN_ATTRIBUTE trait
|
||||||
const AN_ATTRIBUTE: usize;
|
const AN_ATTRIBUTE: usize;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl EasyToImpl for Simple {
|
impl EasyToImpl for Simple {
|
||||||
// @has "$.index[*][?(@.docs=='ToDeclare impl')].inner.assoc_type"
|
//@ has "$.index[*][?(@.docs=='ToDeclare impl')].inner.assoc_type"
|
||||||
// @is "$.index[*][?(@.docs=='ToDeclare impl')].inner.assoc_type.default.primitive" \"usize\"
|
//@ is "$.index[*][?(@.docs=='ToDeclare impl')].inner.assoc_type.default.primitive" \"usize\"
|
||||||
/// ToDeclare impl
|
/// ToDeclare impl
|
||||||
type ToDeclare = usize;
|
type ToDeclare = usize;
|
||||||
|
|
||||||
// @has "$.index[*][?(@.docs=='AN_ATTRIBUTE impl')].inner.assoc_const"
|
//@ has "$.index[*][?(@.docs=='AN_ATTRIBUTE impl')].inner.assoc_const"
|
||||||
// @is "$.index[*][?(@.docs=='AN_ATTRIBUTE impl')].inner.assoc_const.type.primitive" \"usize\"
|
//@ is "$.index[*][?(@.docs=='AN_ATTRIBUTE impl')].inner.assoc_const.type.primitive" \"usize\"
|
||||||
// @is "$.index[*][?(@.docs=='AN_ATTRIBUTE impl')].inner.assoc_const.default" \"12\"
|
//@ is "$.index[*][?(@.docs=='AN_ATTRIBUTE impl')].inner.assoc_const.default" \"12\"
|
||||||
/// AN_ATTRIBUTE impl
|
/// AN_ATTRIBUTE impl
|
||||||
const AN_ATTRIBUTE: usize = 12;
|
const AN_ATTRIBUTE: usize = 12;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
// Regression test for <https://github.com/rust-lang/rust/issues/98547>.
|
// Regression test for <https://github.com/rust-lang/rust/issues/98547>.
|
||||||
|
|
||||||
// @has "$.index[*][?(@.name=='Trait')]"
|
//@ has "$.index[*][?(@.name=='Trait')]"
|
||||||
// @has "$.index[*][?(@.name=='AssocType')]"
|
//@ has "$.index[*][?(@.name=='AssocType')]"
|
||||||
// @has "$.index[*][?(@.name=='S')]"
|
//@ has "$.index[*][?(@.name=='S')]"
|
||||||
// @has "$.index[*][?(@.name=='S2')]"
|
//@ has "$.index[*][?(@.name=='S2')]"
|
||||||
|
|
||||||
pub trait Trait {
|
pub trait Trait {
|
||||||
type AssocType;
|
type AssocType;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
||||||
// @has "$.index[*][?(@.name=='Error')].inner.assoc_type"
|
//@ has "$.index[*][?(@.name=='Error')].inner.assoc_type"
|
||||||
// @has "$.index[*][?(@.name=='Error')].inner.assoc_type.default.resolved_path"
|
//@ has "$.index[*][?(@.name=='Error')].inner.assoc_type.default.resolved_path"
|
||||||
// @has "$.index[*][?(@.name=='Error')].inner.assoc_type.default.resolved_path.name" \"Infallible\"
|
//@ has "$.index[*][?(@.name=='Error')].inner.assoc_type.default.resolved_path.name" \"Infallible\"
|
||||||
pub struct ForBlanketTryFromImpl;
|
pub struct ForBlanketTryFromImpl;
|
||||||
|
|
|
@ -11,8 +11,8 @@ mod auto {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// @count "$.index[*][?(@.name=='builders')]" 1
|
//@ count "$.index[*][?(@.name=='builders')]" 1
|
||||||
// @has "$.index[*][?(@.name == 'ActionRowBuilder')"]
|
//@ has "$.index[*][?(@.name == 'ActionRowBuilder')"]
|
||||||
pub use auto::*;
|
pub use auto::*;
|
||||||
|
|
||||||
pub mod builders {
|
pub mod builders {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
#[repr(i8)]
|
#[repr(i8)]
|
||||||
pub enum Ordering {
|
pub enum Ordering {
|
||||||
// @is "$.index[*][?(@.name=='Less')].inner.variant.discriminant.expr" '"-1"'
|
//@ is "$.index[*][?(@.name=='Less')].inner.variant.discriminant.expr" '"-1"'
|
||||||
// @is "$.index[*][?(@.name=='Less')].inner.variant.discriminant.value" '"-1"'
|
//@ is "$.index[*][?(@.name=='Less')].inner.variant.discriminant.value" '"-1"'
|
||||||
Less = -1,
|
Less = -1,
|
||||||
// @is "$.index[*][?(@.name=='Equal')].inner.variant.discriminant.expr" '"0"'
|
//@ is "$.index[*][?(@.name=='Equal')].inner.variant.discriminant.expr" '"0"'
|
||||||
// @is "$.index[*][?(@.name=='Equal')].inner.variant.discriminant.value" '"0"'
|
//@ is "$.index[*][?(@.name=='Equal')].inner.variant.discriminant.value" '"0"'
|
||||||
Equal = 0,
|
Equal = 0,
|
||||||
// @is "$.index[*][?(@.name=='Greater')].inner.variant.discriminant.expr" '"1"'
|
//@ is "$.index[*][?(@.name=='Greater')].inner.variant.discriminant.expr" '"1"'
|
||||||
// @is "$.index[*][?(@.name=='Greater')].inner.variant.discriminant.value" '"1"'
|
//@ is "$.index[*][?(@.name=='Greater')].inner.variant.discriminant.value" '"1"'
|
||||||
Greater = 1,
|
Greater = 1,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,30 +1,30 @@
|
||||||
pub enum Foo {
|
pub enum Foo {
|
||||||
// @is "$.index[*][?(@.name=='Addition')].inner.variant.discriminant.value" '"0"'
|
//@ is "$.index[*][?(@.name=='Addition')].inner.variant.discriminant.value" '"0"'
|
||||||
// @is "$.index[*][?(@.name=='Addition')].inner.variant.discriminant.expr" '"{ _ }"'
|
//@ is "$.index[*][?(@.name=='Addition')].inner.variant.discriminant.expr" '"{ _ }"'
|
||||||
Addition = 0 + 0,
|
Addition = 0 + 0,
|
||||||
// @is "$.index[*][?(@.name=='Bin')].inner.variant.discriminant.value" '"1"'
|
//@ is "$.index[*][?(@.name=='Bin')].inner.variant.discriminant.value" '"1"'
|
||||||
// @is "$.index[*][?(@.name=='Bin')].inner.variant.discriminant.expr" '"0b1"'
|
//@ is "$.index[*][?(@.name=='Bin')].inner.variant.discriminant.expr" '"0b1"'
|
||||||
Bin = 0b1,
|
Bin = 0b1,
|
||||||
// @is "$.index[*][?(@.name=='Oct')].inner.variant.discriminant.value" '"2"'
|
//@ is "$.index[*][?(@.name=='Oct')].inner.variant.discriminant.value" '"2"'
|
||||||
// @is "$.index[*][?(@.name=='Oct')].inner.variant.discriminant.expr" '"0o2"'
|
//@ is "$.index[*][?(@.name=='Oct')].inner.variant.discriminant.expr" '"0o2"'
|
||||||
Oct = 0o2,
|
Oct = 0o2,
|
||||||
// @is "$.index[*][?(@.name=='PubConst')].inner.variant.discriminant.value" '"3"'
|
//@ is "$.index[*][?(@.name=='PubConst')].inner.variant.discriminant.value" '"3"'
|
||||||
// @is "$.index[*][?(@.name=='PubConst')].inner.variant.discriminant.expr" '"THREE"'
|
//@ is "$.index[*][?(@.name=='PubConst')].inner.variant.discriminant.expr" '"THREE"'
|
||||||
PubConst = THREE,
|
PubConst = THREE,
|
||||||
// @is "$.index[*][?(@.name=='Hex')].inner.variant.discriminant.value" '"4"'
|
//@ is "$.index[*][?(@.name=='Hex')].inner.variant.discriminant.value" '"4"'
|
||||||
// @is "$.index[*][?(@.name=='Hex')].inner.variant.discriminant.expr" '"0x4"'
|
//@ is "$.index[*][?(@.name=='Hex')].inner.variant.discriminant.expr" '"0x4"'
|
||||||
Hex = 0x4,
|
Hex = 0x4,
|
||||||
// @is "$.index[*][?(@.name=='Cast')].inner.variant.discriminant.value" '"5"'
|
//@ is "$.index[*][?(@.name=='Cast')].inner.variant.discriminant.value" '"5"'
|
||||||
// @is "$.index[*][?(@.name=='Cast')].inner.variant.discriminant.expr" '"{ _ }"'
|
//@ is "$.index[*][?(@.name=='Cast')].inner.variant.discriminant.expr" '"{ _ }"'
|
||||||
Cast = 5 as isize,
|
Cast = 5 as isize,
|
||||||
// @is "$.index[*][?(@.name=='PubCall')].inner.variant.discriminant.value" '"6"'
|
//@ is "$.index[*][?(@.name=='PubCall')].inner.variant.discriminant.value" '"6"'
|
||||||
// @is "$.index[*][?(@.name=='PubCall')].inner.variant.discriminant.expr" '"{ _ }"'
|
//@ is "$.index[*][?(@.name=='PubCall')].inner.variant.discriminant.expr" '"{ _ }"'
|
||||||
PubCall = six(),
|
PubCall = six(),
|
||||||
// @is "$.index[*][?(@.name=='PrivCall')].inner.variant.discriminant.value" '"7"'
|
//@ is "$.index[*][?(@.name=='PrivCall')].inner.variant.discriminant.value" '"7"'
|
||||||
// @is "$.index[*][?(@.name=='PrivCall')].inner.variant.discriminant.expr" '"{ _ }"'
|
//@ is "$.index[*][?(@.name=='PrivCall')].inner.variant.discriminant.expr" '"{ _ }"'
|
||||||
PrivCall = seven(),
|
PrivCall = seven(),
|
||||||
// @is "$.index[*][?(@.name=='PrivConst')].inner.variant.discriminant.value" '"8"'
|
//@ is "$.index[*][?(@.name=='PrivConst')].inner.variant.discriminant.value" '"8"'
|
||||||
// @is "$.index[*][?(@.name=='PrivConst')].inner.variant.discriminant.expr" '"EIGHT"'
|
//@ is "$.index[*][?(@.name=='PrivConst')].inner.variant.discriminant.expr" '"EIGHT"'
|
||||||
PrivConst = EIGHT,
|
PrivConst = EIGHT,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,40 +4,40 @@
|
||||||
|
|
||||||
#[repr(u64)]
|
#[repr(u64)]
|
||||||
pub enum U64 {
|
pub enum U64 {
|
||||||
// @is "$.index[*][?(@.name=='U64Min')].inner.variant.discriminant.value" '"0"'
|
//@ is "$.index[*][?(@.name=='U64Min')].inner.variant.discriminant.value" '"0"'
|
||||||
// @is "$.index[*][?(@.name=='U64Min')].inner.variant.discriminant.expr" '"u64::MIN"'
|
//@ is "$.index[*][?(@.name=='U64Min')].inner.variant.discriminant.expr" '"u64::MIN"'
|
||||||
U64Min = u64::MIN,
|
U64Min = u64::MIN,
|
||||||
// @is "$.index[*][?(@.name=='U64Max')].inner.variant.discriminant.value" '"18446744073709551615"'
|
//@ is "$.index[*][?(@.name=='U64Max')].inner.variant.discriminant.value" '"18446744073709551615"'
|
||||||
// @is "$.index[*][?(@.name=='U64Max')].inner.variant.discriminant.expr" '"u64::MAX"'
|
//@ is "$.index[*][?(@.name=='U64Max')].inner.variant.discriminant.expr" '"u64::MAX"'
|
||||||
U64Max = u64::MAX,
|
U64Max = u64::MAX,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(i64)]
|
#[repr(i64)]
|
||||||
pub enum I64 {
|
pub enum I64 {
|
||||||
// @is "$.index[*][?(@.name=='I64Min')].inner.variant.discriminant.value" '"-9223372036854775808"'
|
//@ is "$.index[*][?(@.name=='I64Min')].inner.variant.discriminant.value" '"-9223372036854775808"'
|
||||||
// @is "$.index[*][?(@.name=='I64Min')].inner.variant.discriminant.expr" '"i64::MIN"'
|
//@ is "$.index[*][?(@.name=='I64Min')].inner.variant.discriminant.expr" '"i64::MIN"'
|
||||||
I64Min = i64::MIN,
|
I64Min = i64::MIN,
|
||||||
// @is "$.index[*][?(@.name=='I64Max')].inner.variant.discriminant.value" '"9223372036854775807"'
|
//@ is "$.index[*][?(@.name=='I64Max')].inner.variant.discriminant.value" '"9223372036854775807"'
|
||||||
// @is "$.index[*][?(@.name=='I64Max')].inner.variant.discriminant.expr" '"i64::MAX"'
|
//@ is "$.index[*][?(@.name=='I64Max')].inner.variant.discriminant.expr" '"i64::MAX"'
|
||||||
I64Max = i64::MAX,
|
I64Max = i64::MAX,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(u128)]
|
#[repr(u128)]
|
||||||
pub enum U128 {
|
pub enum U128 {
|
||||||
// @is "$.index[*][?(@.name=='U128Min')].inner.variant.discriminant.value" '"0"'
|
//@ is "$.index[*][?(@.name=='U128Min')].inner.variant.discriminant.value" '"0"'
|
||||||
// @is "$.index[*][?(@.name=='U128Min')].inner.variant.discriminant.expr" '"u128::MIN"'
|
//@ is "$.index[*][?(@.name=='U128Min')].inner.variant.discriminant.expr" '"u128::MIN"'
|
||||||
U128Min = u128::MIN,
|
U128Min = u128::MIN,
|
||||||
// @is "$.index[*][?(@.name=='U128Max')].inner.variant.discriminant.value" '"340282366920938463463374607431768211455"'
|
//@ is "$.index[*][?(@.name=='U128Max')].inner.variant.discriminant.value" '"340282366920938463463374607431768211455"'
|
||||||
// @is "$.index[*][?(@.name=='U128Max')].inner.variant.discriminant.expr" '"u128::MAX"'
|
//@ is "$.index[*][?(@.name=='U128Max')].inner.variant.discriminant.expr" '"u128::MAX"'
|
||||||
U128Max = u128::MAX,
|
U128Max = u128::MAX,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(i128)]
|
#[repr(i128)]
|
||||||
pub enum I128 {
|
pub enum I128 {
|
||||||
// @is "$.index[*][?(@.name=='I128Min')].inner.variant.discriminant.value" '"-170141183460469231731687303715884105728"'
|
//@ is "$.index[*][?(@.name=='I128Min')].inner.variant.discriminant.value" '"-170141183460469231731687303715884105728"'
|
||||||
// @is "$.index[*][?(@.name=='I128Min')].inner.variant.discriminant.expr" '"i128::MIN"'
|
//@ is "$.index[*][?(@.name=='I128Min')].inner.variant.discriminant.expr" '"i128::MIN"'
|
||||||
I128Min = i128::MIN,
|
I128Min = i128::MIN,
|
||||||
// @is "$.index[*][?(@.name=='I128Max')].inner.variant.discriminant.value" '"170141183460469231731687303715884105727"'
|
//@ is "$.index[*][?(@.name=='I128Max')].inner.variant.discriminant.value" '"170141183460469231731687303715884105727"'
|
||||||
// @is "$.index[*][?(@.name=='I128Max')].inner.variant.discriminant.expr" '"i128::MAX"'
|
//@ is "$.index[*][?(@.name=='I128Max')].inner.variant.discriminant.expr" '"i128::MAX"'
|
||||||
I128Max = i128::MAX,
|
I128Max = i128::MAX,
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,16 +2,16 @@
|
||||||
|
|
||||||
#[repr(u32)]
|
#[repr(u32)]
|
||||||
pub enum Foo {
|
pub enum Foo {
|
||||||
// @is "$.index[*][?(@.name=='Basic')].inner.variant.discriminant.value" '"0"'
|
//@ is "$.index[*][?(@.name=='Basic')].inner.variant.discriminant.value" '"0"'
|
||||||
// @is "$.index[*][?(@.name=='Basic')].inner.variant.discriminant.expr" '"0"'
|
//@ is "$.index[*][?(@.name=='Basic')].inner.variant.discriminant.expr" '"0"'
|
||||||
Basic = 0,
|
Basic = 0,
|
||||||
// @is "$.index[*][?(@.name=='Suffix')].inner.variant.discriminant.value" '"10"'
|
//@ is "$.index[*][?(@.name=='Suffix')].inner.variant.discriminant.value" '"10"'
|
||||||
// @is "$.index[*][?(@.name=='Suffix')].inner.variant.discriminant.expr" '"10u32"'
|
//@ is "$.index[*][?(@.name=='Suffix')].inner.variant.discriminant.expr" '"10u32"'
|
||||||
Suffix = 10u32,
|
Suffix = 10u32,
|
||||||
// @is "$.index[*][?(@.name=='Underscore')].inner.variant.discriminant.value" '"100"'
|
//@ is "$.index[*][?(@.name=='Underscore')].inner.variant.discriminant.value" '"100"'
|
||||||
// @is "$.index[*][?(@.name=='Underscore')].inner.variant.discriminant.expr" '"1_0_0"'
|
//@ is "$.index[*][?(@.name=='Underscore')].inner.variant.discriminant.expr" '"1_0_0"'
|
||||||
Underscore = 1_0_0,
|
Underscore = 1_0_0,
|
||||||
// @is "$.index[*][?(@.name=='SuffixUnderscore')].inner.variant.discriminant.value" '"1000"'
|
//@ is "$.index[*][?(@.name=='SuffixUnderscore')].inner.variant.discriminant.value" '"1000"'
|
||||||
// @is "$.index[*][?(@.name=='SuffixUnderscore')].inner.variant.discriminant.expr" '"1_0_0_0u32"'
|
//@ is "$.index[*][?(@.name=='SuffixUnderscore')].inner.variant.discriminant.expr" '"1_0_0_0u32"'
|
||||||
SuffixUnderscore = 1_0_0_0u32,
|
SuffixUnderscore = 1_0_0_0u32,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
// ignore-tidy-linelength
|
// ignore-tidy-linelength
|
||||||
|
|
||||||
pub enum Foo {
|
pub enum Foo {
|
||||||
// @is "$.index[*][?(@.name=='Has')].inner.variant.discriminant" '{"expr":"0", "value":"0"}'
|
//@ is "$.index[*][?(@.name=='Has')].inner.variant.discriminant" '{"expr":"0", "value":"0"}'
|
||||||
Has = 0,
|
Has = 0,
|
||||||
// @is "$.index[*][?(@.name=='Doesnt')].inner.variant.discriminant" null
|
//@ is "$.index[*][?(@.name=='Doesnt')].inner.variant.discriminant" null
|
||||||
Doesnt,
|
Doesnt,
|
||||||
// @is "$.index[*][?(@.name=='AlsoDoesnt')].inner.variant.discriminant" null
|
//@ is "$.index[*][?(@.name=='AlsoDoesnt')].inner.variant.discriminant" null
|
||||||
AlsoDoesnt,
|
AlsoDoesnt,
|
||||||
// @is "$.index[*][?(@.name=='AlsoHas')].inner.variant.discriminant" '{"expr":"44", "value":"44"}'
|
//@ is "$.index[*][?(@.name=='AlsoHas')].inner.variant.discriminant" '{"expr":"44", "value":"44"}'
|
||||||
AlsoHas = 44,
|
AlsoHas = 44,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
// ignore-tidy-linelength
|
// ignore-tidy-linelength
|
||||||
|
|
||||||
#[repr(i32)]
|
#[repr(i32)]
|
||||||
// @is "$.index[*][?(@.name=='Foo')].attrs" '["#[repr(i32)]"]'
|
//@ is "$.index[*][?(@.name=='Foo')].attrs" '["#[repr(i32)]"]'
|
||||||
pub enum Foo {
|
pub enum Foo {
|
||||||
// @is "$.index[*][?(@.name=='Struct')].inner.variant.discriminant" null
|
//@ is "$.index[*][?(@.name=='Struct')].inner.variant.discriminant" null
|
||||||
// @count "$.index[*][?(@.name=='Struct')].inner.variant.kind.struct.fields[*]" 0
|
//@ count "$.index[*][?(@.name=='Struct')].inner.variant.kind.struct.fields[*]" 0
|
||||||
Struct {},
|
Struct {},
|
||||||
// @is "$.index[*][?(@.name=='StructWithDiscr')].inner.variant.discriminant" '{"expr": "42", "value": "42"}'
|
//@ is "$.index[*][?(@.name=='StructWithDiscr')].inner.variant.discriminant" '{"expr": "42", "value": "42"}'
|
||||||
// @count "$.index[*][?(@.name=='StructWithDiscr')].inner.variant.kind.struct.fields[*]" 1
|
//@ count "$.index[*][?(@.name=='StructWithDiscr')].inner.variant.kind.struct.fields[*]" 1
|
||||||
StructWithDiscr { x: i32 } = 42,
|
StructWithDiscr { x: i32 } = 42,
|
||||||
// @is "$.index[*][?(@.name=='StructWithHexDiscr')].inner.variant.discriminant" '{"expr": "0x42", "value": "66"}'
|
//@ is "$.index[*][?(@.name=='StructWithHexDiscr')].inner.variant.discriminant" '{"expr": "0x42", "value": "66"}'
|
||||||
// @count "$.index[*][?(@.name=='StructWithHexDiscr')].inner.variant.kind.struct.fields[*]" 2
|
//@ count "$.index[*][?(@.name=='StructWithHexDiscr')].inner.variant.kind.struct.fields[*]" 2
|
||||||
StructWithHexDiscr { x: i32, y: bool } = 0x42,
|
StructWithHexDiscr { x: i32, y: bool } = 0x42,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
// ignore-tidy-linelength
|
// ignore-tidy-linelength
|
||||||
|
|
||||||
#[repr(u32)]
|
#[repr(u32)]
|
||||||
// @is "$.index[*][?(@.name=='Foo')].attrs" '["#[repr(u32)]"]'
|
//@ is "$.index[*][?(@.name=='Foo')].attrs" '["#[repr(u32)]"]'
|
||||||
pub enum Foo {
|
pub enum Foo {
|
||||||
// @is "$.index[*][?(@.name=='Tuple')].inner.variant.discriminant" null
|
//@ is "$.index[*][?(@.name=='Tuple')].inner.variant.discriminant" null
|
||||||
// @count "$.index[*][?(@.name=='Tuple')].inner.variant.kind.tuple[*]" 0
|
//@ count "$.index[*][?(@.name=='Tuple')].inner.variant.kind.tuple[*]" 0
|
||||||
Tuple(),
|
Tuple(),
|
||||||
// @is "$.index[*][?(@.name=='TupleWithDiscr')].inner.variant.discriminant" '{"expr": "1", "value": "1"}'
|
//@ is "$.index[*][?(@.name=='TupleWithDiscr')].inner.variant.discriminant" '{"expr": "1", "value": "1"}'
|
||||||
// @count "$.index[*][?(@.name=='TupleWithDiscr')].inner.variant.kind.tuple[*]" 1
|
//@ count "$.index[*][?(@.name=='TupleWithDiscr')].inner.variant.kind.tuple[*]" 1
|
||||||
TupleWithDiscr(i32) = 1,
|
TupleWithDiscr(i32) = 1,
|
||||||
// @is "$.index[*][?(@.name=='TupleWithBinDiscr')].inner.variant.discriminant" '{"expr": "0b10", "value": "2"}'
|
//@ is "$.index[*][?(@.name=='TupleWithBinDiscr')].inner.variant.discriminant" '{"expr": "0b10", "value": "2"}'
|
||||||
// @count "$.index[*][?(@.name=='TupleWithBinDiscr')].inner.variant.kind.tuple[*]" 2
|
//@ count "$.index[*][?(@.name=='TupleWithBinDiscr')].inner.variant.kind.tuple[*]" 2
|
||||||
TupleWithBinDiscr(i32, i32) = 0b10,
|
TupleWithBinDiscr(i32, i32) = 0b10,
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
extern crate color;
|
extern crate color;
|
||||||
use color::Color::Red;
|
use color::Color::Red;
|
||||||
|
|
||||||
// @set red = "$.index[*][?(@.inner.module.is_crate)].links.Red"
|
//@ set red = "$.index[*][?(@.inner.module.is_crate)].links.Red"
|
||||||
|
|
||||||
// @!has "$.index[*][?(@.name == 'Red')]"
|
//@ !has "$.index[*][?(@.name == 'Red')]"
|
||||||
// @!has "$.index[*][?(@.name == 'Color')]"
|
//@ !has "$.index[*][?(@.name == 'Color')]"
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
// Regression test for <https://github.com/rust-lang/rust/issues/100529>.
|
// Regression test for <https://github.com/rust-lang/rust/issues/100529>.
|
||||||
|
|
||||||
// @has "$.index[*][?(@.name=='ParseError')]"
|
//@ has "$.index[*][?(@.name=='ParseError')]"
|
||||||
// @has "$.index[*][?(@.name=='UnexpectedEndTag')]"
|
//@ has "$.index[*][?(@.name=='UnexpectedEndTag')]"
|
||||||
// @is "$.index[*][?(@.name=='UnexpectedEndTag')].inner.variant.kind.tuple" [null]
|
//@ is "$.index[*][?(@.name=='UnexpectedEndTag')].inner.variant.kind.tuple" [null]
|
||||||
// @is "$.index[*][?(@.name=='UnexpectedEndTag')].inner.variant.discriminant" null
|
//@ is "$.index[*][?(@.name=='UnexpectedEndTag')].inner.variant.discriminant" null
|
||||||
|
|
||||||
pub enum ParseError {
|
pub enum ParseError {
|
||||||
UnexpectedEndTag(#[doc(hidden)] u32),
|
UnexpectedEndTag(#[doc(hidden)] u32),
|
||||||
|
|
|
@ -17,24 +17,24 @@ pub enum Whatever {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
// @set 0 = '$.index[*][?(@.name == "ews_0")].id'
|
//@ set 0 = '$.index[*][?(@.name == "ews_0")].id'
|
||||||
// @set 1 = '$.index[*][?(@.name == "dik_1")].id'
|
//@ set 1 = '$.index[*][?(@.name == "dik_1")].id'
|
||||||
// @set 2 = '$.index[*][?(@.name == "hsk_2")].id'
|
//@ set 2 = '$.index[*][?(@.name == "hsk_2")].id'
|
||||||
// @set 3 = '$.index[*][?(@.name == "djt_3")].id'
|
//@ set 3 = '$.index[*][?(@.name == "djt_3")].id'
|
||||||
// @set 4 = '$.index[*][?(@.name == "jnr_4")].id'
|
//@ set 4 = '$.index[*][?(@.name == "jnr_4")].id'
|
||||||
// @set 5 = '$.index[*][?(@.name == "dfs_5")].id'
|
//@ set 5 = '$.index[*][?(@.name == "dfs_5")].id'
|
||||||
// @set 6 = '$.index[*][?(@.name == "bja_6")].id'
|
//@ set 6 = '$.index[*][?(@.name == "bja_6")].id'
|
||||||
// @set 7 = '$.index[*][?(@.name == "lyc_7")].id'
|
//@ set 7 = '$.index[*][?(@.name == "lyc_7")].id'
|
||||||
// @set 8 = '$.index[*][?(@.name == "yqd_8")].id'
|
//@ set 8 = '$.index[*][?(@.name == "yqd_8")].id'
|
||||||
// @set 9 = '$.index[*][?(@.name == "vll_9")].id'
|
//@ set 9 = '$.index[*][?(@.name == "vll_9")].id'
|
||||||
|
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.variant.kind.struct.fields[0]' $0
|
//@ is '$.index[*][?(@.name == "Foo")].inner.variant.kind.struct.fields[0]' $0
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.variant.kind.struct.fields[1]' $1
|
//@ is '$.index[*][?(@.name == "Foo")].inner.variant.kind.struct.fields[1]' $1
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.variant.kind.struct.fields[2]' $2
|
//@ is '$.index[*][?(@.name == "Foo")].inner.variant.kind.struct.fields[2]' $2
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.variant.kind.struct.fields[3]' $3
|
//@ is '$.index[*][?(@.name == "Foo")].inner.variant.kind.struct.fields[3]' $3
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.variant.kind.struct.fields[4]' $4
|
//@ is '$.index[*][?(@.name == "Foo")].inner.variant.kind.struct.fields[4]' $4
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.variant.kind.struct.fields[5]' $5
|
//@ is '$.index[*][?(@.name == "Foo")].inner.variant.kind.struct.fields[5]' $5
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.variant.kind.struct.fields[6]' $6
|
//@ is '$.index[*][?(@.name == "Foo")].inner.variant.kind.struct.fields[6]' $6
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.variant.kind.struct.fields[7]' $7
|
//@ is '$.index[*][?(@.name == "Foo")].inner.variant.kind.struct.fields[7]' $7
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.variant.kind.struct.fields[8]' $8
|
//@ is '$.index[*][?(@.name == "Foo")].inner.variant.kind.struct.fields[8]' $8
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.variant.kind.struct.fields[9]' $9
|
//@ is '$.index[*][?(@.name == "Foo")].inner.variant.kind.struct.fields[9]' $9
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
// ignore-tidy-linelength
|
// ignore-tidy-linelength
|
||||||
|
|
||||||
pub enum Foo {
|
pub enum Foo {
|
||||||
// @set Unit = "$.index[*][?(@.name=='Unit')].id"
|
//@ set Unit = "$.index[*][?(@.name=='Unit')].id"
|
||||||
// @is "$.index[*][?(@.name=='Unit')].inner.variant.kind" '"plain"'
|
//@ is "$.index[*][?(@.name=='Unit')].inner.variant.kind" '"plain"'
|
||||||
Unit,
|
Unit,
|
||||||
// @set Named = "$.index[*][?(@.name=='Named')].id"
|
//@ set Named = "$.index[*][?(@.name=='Named')].id"
|
||||||
// @is "$.index[*][?(@.name=='Named')].inner.variant.kind.struct" '{"fields": [], "fields_stripped": false}'
|
//@ is "$.index[*][?(@.name=='Named')].inner.variant.kind.struct" '{"fields": [], "fields_stripped": false}'
|
||||||
Named {},
|
Named {},
|
||||||
// @set Tuple = "$.index[*][?(@.name=='Tuple')].id"
|
//@ set Tuple = "$.index[*][?(@.name=='Tuple')].id"
|
||||||
// @is "$.index[*][?(@.name=='Tuple')].inner.variant.kind.tuple" []
|
//@ is "$.index[*][?(@.name=='Tuple')].inner.variant.kind.tuple" []
|
||||||
Tuple(),
|
Tuple(),
|
||||||
// @set NamedField = "$.index[*][?(@.name=='NamedField')].id"
|
//@ set NamedField = "$.index[*][?(@.name=='NamedField')].id"
|
||||||
// @set x = "$.index[*][?(@.name=='x' && @.inner.struct_field)].id"
|
//@ set x = "$.index[*][?(@.name=='x' && @.inner.struct_field)].id"
|
||||||
// @is "$.index[*][?(@.name=='NamedField')].inner.variant.kind.struct.fields[*]" $x
|
//@ is "$.index[*][?(@.name=='NamedField')].inner.variant.kind.struct.fields[*]" $x
|
||||||
// @is "$.index[*][?(@.name=='NamedField')].inner.variant.kind.struct.fields_stripped" false
|
//@ is "$.index[*][?(@.name=='NamedField')].inner.variant.kind.struct.fields_stripped" false
|
||||||
NamedField { x: i32 },
|
NamedField { x: i32 },
|
||||||
// @set TupleField = "$.index[*][?(@.name=='TupleField')].id"
|
//@ set TupleField = "$.index[*][?(@.name=='TupleField')].id"
|
||||||
// @set tup_field = "$.index[*][?(@.name=='0' && @.inner.struct_field)].id"
|
//@ set tup_field = "$.index[*][?(@.name=='0' && @.inner.struct_field)].id"
|
||||||
// @is "$.index[*][?(@.name=='TupleField')].inner.variant.kind.tuple[*]" $tup_field
|
//@ is "$.index[*][?(@.name=='TupleField')].inner.variant.kind.tuple[*]" $tup_field
|
||||||
TupleField(i32),
|
TupleField(i32),
|
||||||
}
|
}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='Foo')].inner.enum.variants[0]" $Unit
|
//@ is "$.index[*][?(@.name=='Foo')].inner.enum.variants[0]" $Unit
|
||||||
// @is "$.index[*][?(@.name=='Foo')].inner.enum.variants[1]" $Named
|
//@ is "$.index[*][?(@.name=='Foo')].inner.enum.variants[1]" $Named
|
||||||
// @is "$.index[*][?(@.name=='Foo')].inner.enum.variants[2]" $Tuple
|
//@ is "$.index[*][?(@.name=='Foo')].inner.enum.variants[2]" $Tuple
|
||||||
// @is "$.index[*][?(@.name=='Foo')].inner.enum.variants[3]" $NamedField
|
//@ is "$.index[*][?(@.name=='Foo')].inner.enum.variants[3]" $NamedField
|
||||||
// @is "$.index[*][?(@.name=='Foo')].inner.enum.variants[4]" $TupleField
|
//@ is "$.index[*][?(@.name=='Foo')].inner.enum.variants[4]" $TupleField
|
||||||
// @count "$.index[*][?(@.name=='Foo')].inner.enum.variants[*]" 5
|
//@ count "$.index[*][?(@.name=='Foo')].inner.enum.variants[*]" 5
|
||||||
|
|
|
@ -2,15 +2,15 @@ pub enum Foo {
|
||||||
Variant {
|
Variant {
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
a: i32,
|
a: i32,
|
||||||
// @set b = "$.index[*][?(@.name=='b')].id"
|
//@ set b = "$.index[*][?(@.name=='b')].id"
|
||||||
b: i32,
|
b: i32,
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
x: i32,
|
x: i32,
|
||||||
// @set y = "$.index[*][?(@.name=='y')].id"
|
//@ set y = "$.index[*][?(@.name=='y')].id"
|
||||||
y: i32,
|
y: i32,
|
||||||
},
|
},
|
||||||
// @is "$.index[*][?(@.name=='Variant')].inner.variant.kind.struct.fields_stripped" true
|
//@ is "$.index[*][?(@.name=='Variant')].inner.variant.kind.struct.fields_stripped" true
|
||||||
// @is "$.index[*][?(@.name=='Variant')].inner.variant.kind.struct.fields[0]" $b
|
//@ is "$.index[*][?(@.name=='Variant')].inner.variant.kind.struct.fields[0]" $b
|
||||||
// @is "$.index[*][?(@.name=='Variant')].inner.variant.kind.struct.fields[1]" $y
|
//@ is "$.index[*][?(@.name=='Variant')].inner.variant.kind.struct.fields[1]" $y
|
||||||
// @count "$.index[*][?(@.name=='Variant')].inner.variant.kind.struct.fields[*]" 2
|
//@ count "$.index[*][?(@.name=='Variant')].inner.variant.kind.struct.fields[*]" 2
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,80 +1,80 @@
|
||||||
// @set 1.1.0 = "$.index[*][?(@.docs=='1.1.0')].id"
|
//@ set 1.1.0 = "$.index[*][?(@.docs=='1.1.0')].id"
|
||||||
// @set 2.1.0 = "$.index[*][?(@.docs=='2.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.1.1 = "$.index[*][?(@.docs=='2.1.1')].id"
|
||||||
// @set 2.2.1 = "$.index[*][?(@.docs=='2.2.1')].id"
|
//@ set 2.2.1 = "$.index[*][?(@.docs=='2.2.1')].id"
|
||||||
// @set 2.3.0 = "$.index[*][?(@.docs=='2.3.0')].id"
|
//@ set 2.3.0 = "$.index[*][?(@.docs=='2.3.0')].id"
|
||||||
// @set 3.1.1 = "$.index[*][?(@.docs=='3.1.1')].id"
|
//@ set 3.1.1 = "$.index[*][?(@.docs=='3.1.1')].id"
|
||||||
// @set 3.1.2 = "$.index[*][?(@.docs=='3.1.2')].id"
|
//@ set 3.1.2 = "$.index[*][?(@.docs=='3.1.2')].id"
|
||||||
// @set 3.2.0 = "$.index[*][?(@.docs=='3.2.0')].id"
|
//@ set 3.2.0 = "$.index[*][?(@.docs=='3.2.0')].id"
|
||||||
// @set 3.2.2 = "$.index[*][?(@.docs=='3.2.2')].id"
|
//@ set 3.2.2 = "$.index[*][?(@.docs=='3.2.2')].id"
|
||||||
// @set 3.3.0 = "$.index[*][?(@.docs=='3.3.0')].id"
|
//@ set 3.3.0 = "$.index[*][?(@.docs=='3.3.0')].id"
|
||||||
// @set 3.3.1 = "$.index[*][?(@.docs=='3.3.1')].id"
|
//@ set 3.3.1 = "$.index[*][?(@.docs=='3.3.1')].id"
|
||||||
|
|
||||||
pub enum EnumWithStrippedTupleVariants {
|
pub enum EnumWithStrippedTupleVariants {
|
||||||
// @count "$.index[*][?(@.name=='None')].inner.variant.kind.tuple[*]" 0
|
//@ count "$.index[*][?(@.name=='None')].inner.variant.kind.tuple[*]" 0
|
||||||
None(),
|
None(),
|
||||||
|
|
||||||
// @count "$.index[*][?(@.name=='One')].inner.variant.kind.tuple[*]" 1
|
//@ count "$.index[*][?(@.name=='One')].inner.variant.kind.tuple[*]" 1
|
||||||
// @is "$.index[*][?(@.name=='One')].inner.variant.kind.tuple[0]" $1.1.0
|
//@ is "$.index[*][?(@.name=='One')].inner.variant.kind.tuple[0]" $1.1.0
|
||||||
One(/** 1.1.0*/ bool),
|
One(/** 1.1.0*/ bool),
|
||||||
// @count "$.index[*][?(@.name=='OneHidden')].inner.variant.kind.tuple[*]" 1
|
//@ count "$.index[*][?(@.name=='OneHidden')].inner.variant.kind.tuple[*]" 1
|
||||||
// @is "$.index[*][?(@.name=='OneHidden')].inner.variant.kind.tuple[0]" null
|
//@ is "$.index[*][?(@.name=='OneHidden')].inner.variant.kind.tuple[0]" null
|
||||||
OneHidden(#[doc(hidden)] bool),
|
OneHidden(#[doc(hidden)] bool),
|
||||||
|
|
||||||
// @count "$.index[*][?(@.name=='Two')].inner.variant.kind.tuple[*]" 2
|
//@ count "$.index[*][?(@.name=='Two')].inner.variant.kind.tuple[*]" 2
|
||||||
// @is "$.index[*][?(@.name=='Two')].inner.variant.kind.tuple[0]" $2.1.0
|
//@ is "$.index[*][?(@.name=='Two')].inner.variant.kind.tuple[0]" $2.1.0
|
||||||
// @is "$.index[*][?(@.name=='Two')].inner.variant.kind.tuple[1]" $2.1.1
|
//@ is "$.index[*][?(@.name=='Two')].inner.variant.kind.tuple[1]" $2.1.1
|
||||||
Two(/** 2.1.0*/ bool, /** 2.1.1*/ bool),
|
Two(/** 2.1.0*/ bool, /** 2.1.1*/ bool),
|
||||||
// @count "$.index[*][?(@.name=='TwoLeftHidden')].inner.variant.kind.tuple[*]" 2
|
//@ count "$.index[*][?(@.name=='TwoLeftHidden')].inner.variant.kind.tuple[*]" 2
|
||||||
// @is "$.index[*][?(@.name=='TwoLeftHidden')].inner.variant.kind.tuple[0]" null
|
//@ is "$.index[*][?(@.name=='TwoLeftHidden')].inner.variant.kind.tuple[0]" null
|
||||||
// @is "$.index[*][?(@.name=='TwoLeftHidden')].inner.variant.kind.tuple[1]" $2.2.1
|
//@ is "$.index[*][?(@.name=='TwoLeftHidden')].inner.variant.kind.tuple[1]" $2.2.1
|
||||||
TwoLeftHidden(#[doc(hidden)] bool, /** 2.2.1*/ bool),
|
TwoLeftHidden(#[doc(hidden)] bool, /** 2.2.1*/ bool),
|
||||||
// @count "$.index[*][?(@.name=='TwoRightHidden')].inner.variant.kind.tuple[*]" 2
|
//@ count "$.index[*][?(@.name=='TwoRightHidden')].inner.variant.kind.tuple[*]" 2
|
||||||
// @is "$.index[*][?(@.name=='TwoRightHidden')].inner.variant.kind.tuple[0]" $2.3.0
|
//@ is "$.index[*][?(@.name=='TwoRightHidden')].inner.variant.kind.tuple[0]" $2.3.0
|
||||||
// @is "$.index[*][?(@.name=='TwoRightHidden')].inner.variant.kind.tuple[1]" null
|
//@ is "$.index[*][?(@.name=='TwoRightHidden')].inner.variant.kind.tuple[1]" null
|
||||||
TwoRightHidden(/** 2.3.0*/ bool, #[doc(hidden)] bool),
|
TwoRightHidden(/** 2.3.0*/ bool, #[doc(hidden)] bool),
|
||||||
// @count "$.index[*][?(@.name=='TwoBothHidden')].inner.variant.kind.tuple[*]" 2
|
//@ count "$.index[*][?(@.name=='TwoBothHidden')].inner.variant.kind.tuple[*]" 2
|
||||||
// @is "$.index[*][?(@.name=='TwoBothHidden')].inner.variant.kind.tuple[0]" null
|
//@ is "$.index[*][?(@.name=='TwoBothHidden')].inner.variant.kind.tuple[0]" null
|
||||||
// @is "$.index[*][?(@.name=='TwoBothHidden')].inner.variant.kind.tuple[1]" null
|
//@ is "$.index[*][?(@.name=='TwoBothHidden')].inner.variant.kind.tuple[1]" null
|
||||||
TwoBothHidden(#[doc(hidden)] bool, #[doc(hidden)] bool),
|
TwoBothHidden(#[doc(hidden)] bool, #[doc(hidden)] bool),
|
||||||
|
|
||||||
// @count "$.index[*][?(@.name=='Three1')].inner.variant.kind.tuple[*]" 3
|
//@ count "$.index[*][?(@.name=='Three1')].inner.variant.kind.tuple[*]" 3
|
||||||
// @is "$.index[*][?(@.name=='Three1')].inner.variant.kind.tuple[0]" null
|
//@ is "$.index[*][?(@.name=='Three1')].inner.variant.kind.tuple[0]" null
|
||||||
// @is "$.index[*][?(@.name=='Three1')].inner.variant.kind.tuple[1]" $3.1.1
|
//@ is "$.index[*][?(@.name=='Three1')].inner.variant.kind.tuple[1]" $3.1.1
|
||||||
// @is "$.index[*][?(@.name=='Three1')].inner.variant.kind.tuple[2]" $3.1.2
|
//@ is "$.index[*][?(@.name=='Three1')].inner.variant.kind.tuple[2]" $3.1.2
|
||||||
Three1(#[doc(hidden)] bool, /** 3.1.1*/ bool, /** 3.1.2*/ bool),
|
Three1(#[doc(hidden)] bool, /** 3.1.1*/ bool, /** 3.1.2*/ bool),
|
||||||
// @count "$.index[*][?(@.name=='Three2')].inner.variant.kind.tuple[*]" 3
|
//@ count "$.index[*][?(@.name=='Three2')].inner.variant.kind.tuple[*]" 3
|
||||||
// @is "$.index[*][?(@.name=='Three2')].inner.variant.kind.tuple[0]" $3.2.0
|
//@ is "$.index[*][?(@.name=='Three2')].inner.variant.kind.tuple[0]" $3.2.0
|
||||||
// @is "$.index[*][?(@.name=='Three2')].inner.variant.kind.tuple[1]" null
|
//@ is "$.index[*][?(@.name=='Three2')].inner.variant.kind.tuple[1]" null
|
||||||
// @is "$.index[*][?(@.name=='Three2')].inner.variant.kind.tuple[2]" $3.2.2
|
//@ is "$.index[*][?(@.name=='Three2')].inner.variant.kind.tuple[2]" $3.2.2
|
||||||
Three2(/** 3.2.0*/ bool, #[doc(hidden)] bool, /** 3.2.2*/ bool),
|
Three2(/** 3.2.0*/ bool, #[doc(hidden)] bool, /** 3.2.2*/ bool),
|
||||||
// @count "$.index[*][?(@.name=='Three3')].inner.variant.kind.tuple[*]" 3
|
//@ count "$.index[*][?(@.name=='Three3')].inner.variant.kind.tuple[*]" 3
|
||||||
// @is "$.index[*][?(@.name=='Three3')].inner.variant.kind.tuple[0]" $3.3.0
|
//@ is "$.index[*][?(@.name=='Three3')].inner.variant.kind.tuple[0]" $3.3.0
|
||||||
// @is "$.index[*][?(@.name=='Three3')].inner.variant.kind.tuple[1]" $3.3.1
|
//@ is "$.index[*][?(@.name=='Three3')].inner.variant.kind.tuple[1]" $3.3.1
|
||||||
// @is "$.index[*][?(@.name=='Three3')].inner.variant.kind.tuple[2]" null
|
//@ is "$.index[*][?(@.name=='Three3')].inner.variant.kind.tuple[2]" null
|
||||||
Three3(/** 3.3.0*/ bool, /** 3.3.1*/ bool, #[doc(hidden)] bool),
|
Three3(/** 3.3.0*/ bool, /** 3.3.1*/ bool, #[doc(hidden)] bool),
|
||||||
}
|
}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.docs=='1.1.0')].name" '"0"'
|
//@ is "$.index[*][?(@.docs=='1.1.0')].name" '"0"'
|
||||||
// @is "$.index[*][?(@.docs=='2.1.0')].name" '"0"'
|
//@ is "$.index[*][?(@.docs=='2.1.0')].name" '"0"'
|
||||||
// @is "$.index[*][?(@.docs=='2.1.1')].name" '"1"'
|
//@ is "$.index[*][?(@.docs=='2.1.1')].name" '"1"'
|
||||||
// @is "$.index[*][?(@.docs=='2.2.1')].name" '"1"'
|
//@ is "$.index[*][?(@.docs=='2.2.1')].name" '"1"'
|
||||||
// @is "$.index[*][?(@.docs=='2.3.0')].name" '"0"'
|
//@ is "$.index[*][?(@.docs=='2.3.0')].name" '"0"'
|
||||||
// @is "$.index[*][?(@.docs=='3.1.1')].name" '"1"'
|
//@ is "$.index[*][?(@.docs=='3.1.1')].name" '"1"'
|
||||||
// @is "$.index[*][?(@.docs=='3.1.2')].name" '"2"'
|
//@ is "$.index[*][?(@.docs=='3.1.2')].name" '"2"'
|
||||||
// @is "$.index[*][?(@.docs=='3.2.0')].name" '"0"'
|
//@ is "$.index[*][?(@.docs=='3.2.0')].name" '"0"'
|
||||||
// @is "$.index[*][?(@.docs=='3.2.2')].name" '"2"'
|
//@ is "$.index[*][?(@.docs=='3.2.2')].name" '"2"'
|
||||||
// @is "$.index[*][?(@.docs=='3.3.0')].name" '"0"'
|
//@ is "$.index[*][?(@.docs=='3.3.0')].name" '"0"'
|
||||||
// @is "$.index[*][?(@.docs=='3.3.1')].name" '"1"'
|
//@ is "$.index[*][?(@.docs=='3.3.1')].name" '"1"'
|
||||||
|
|
||||||
// @is "$.index[*][?(@.docs=='1.1.0')].inner.struct_field" '{"primitive": "bool"}'
|
//@ is "$.index[*][?(@.docs=='1.1.0')].inner.struct_field" '{"primitive": "bool"}'
|
||||||
// @is "$.index[*][?(@.docs=='2.1.0')].inner.struct_field" '{"primitive": "bool"}'
|
//@ is "$.index[*][?(@.docs=='2.1.0')].inner.struct_field" '{"primitive": "bool"}'
|
||||||
// @is "$.index[*][?(@.docs=='2.1.1')].inner.struct_field" '{"primitive": "bool"}'
|
//@ is "$.index[*][?(@.docs=='2.1.1')].inner.struct_field" '{"primitive": "bool"}'
|
||||||
// @is "$.index[*][?(@.docs=='2.2.1')].inner.struct_field" '{"primitive": "bool"}'
|
//@ is "$.index[*][?(@.docs=='2.2.1')].inner.struct_field" '{"primitive": "bool"}'
|
||||||
// @is "$.index[*][?(@.docs=='2.3.0')].inner.struct_field" '{"primitive": "bool"}'
|
//@ is "$.index[*][?(@.docs=='2.3.0')].inner.struct_field" '{"primitive": "bool"}'
|
||||||
// @is "$.index[*][?(@.docs=='3.1.1')].inner.struct_field" '{"primitive": "bool"}'
|
//@ is "$.index[*][?(@.docs=='3.1.1')].inner.struct_field" '{"primitive": "bool"}'
|
||||||
// @is "$.index[*][?(@.docs=='3.1.2')].inner.struct_field" '{"primitive": "bool"}'
|
//@ is "$.index[*][?(@.docs=='3.1.2')].inner.struct_field" '{"primitive": "bool"}'
|
||||||
// @is "$.index[*][?(@.docs=='3.2.0')].inner.struct_field" '{"primitive": "bool"}'
|
//@ is "$.index[*][?(@.docs=='3.2.0')].inner.struct_field" '{"primitive": "bool"}'
|
||||||
// @is "$.index[*][?(@.docs=='3.2.2')].inner.struct_field" '{"primitive": "bool"}'
|
//@ is "$.index[*][?(@.docs=='3.2.2')].inner.struct_field" '{"primitive": "bool"}'
|
||||||
// @is "$.index[*][?(@.docs=='3.3.0')].inner.struct_field" '{"primitive": "bool"}'
|
//@ is "$.index[*][?(@.docs=='3.3.0')].inner.struct_field" '{"primitive": "bool"}'
|
||||||
// @is "$.index[*][?(@.docs=='3.3.1')].inner.struct_field" '{"primitive": "bool"}'
|
//@ is "$.index[*][?(@.docs=='3.3.1')].inner.struct_field" '{"primitive": "bool"}'
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
// Regression test for <https://github.com/rust-lang/rust/issues/104942>
|
// Regression test for <https://github.com/rust-lang/rust/issues/104942>
|
||||||
|
|
||||||
// @set Color = "$.index[*][?(@.name == 'Color')].id"
|
//@ set Color = "$.index[*][?(@.name == 'Color')].id"
|
||||||
pub enum Color {
|
pub enum Color {
|
||||||
Red,
|
Red,
|
||||||
Green,
|
Green,
|
||||||
Blue,
|
Blue,
|
||||||
}
|
}
|
||||||
|
|
||||||
// @set use_Color = "$.index[*][?(@.inner.import)].id"
|
//@ set use_Color = "$.index[*][?(@.inner.import)].id"
|
||||||
// @is "$.index[*][?(@.inner.import)].inner.import.id" $Color
|
//@ is "$.index[*][?(@.inner.import)].inner.import.id" $Color
|
||||||
// @is "$.index[*][?(@.inner.import)].inner.import.glob" true
|
//@ is "$.index[*][?(@.inner.import)].inner.import.glob" true
|
||||||
pub use Color::*;
|
pub use Color::*;
|
||||||
|
|
||||||
// @ismany "$.index[*][?(@.name == 'use_glob')].inner.module.items[*]" $Color $use_Color
|
//@ ismany "$.index[*][?(@.name == 'use_glob')].inner.module.items[*]" $Color $use_Color
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
// @set AlwaysNone = "$.index[*][?(@.name == 'AlwaysNone')].id"
|
//@ set AlwaysNone = "$.index[*][?(@.name == 'AlwaysNone')].id"
|
||||||
pub enum AlwaysNone {
|
pub enum AlwaysNone {
|
||||||
// @set None = "$.index[*][?(@.name == 'None')].id"
|
//@ set None = "$.index[*][?(@.name == 'None')].id"
|
||||||
None,
|
None,
|
||||||
}
|
}
|
||||||
// @is "$.index[*][?(@.name == 'AlwaysNone')].inner.enum.variants[*]" $None
|
//@ is "$.index[*][?(@.name == 'AlwaysNone')].inner.enum.variants[*]" $None
|
||||||
|
|
||||||
// @set use_None = "$.index[*][?(@.inner.import)].id"
|
//@ set use_None = "$.index[*][?(@.inner.import)].id"
|
||||||
// @is "$.index[*][?(@.inner.import)].inner.import.id" $None
|
//@ is "$.index[*][?(@.inner.import)].inner.import.id" $None
|
||||||
pub use AlwaysNone::None;
|
pub use AlwaysNone::None;
|
||||||
|
|
||||||
// @ismany "$.index[*][?(@.name == 'use_variant')].inner.module.items[*]" $AlwaysNone $use_None
|
//@ ismany "$.index[*][?(@.name == 'use_variant')].inner.module.items[*]" $AlwaysNone $use_None
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
extern crate color;
|
extern crate color;
|
||||||
|
|
||||||
// @has "$.index[*].inner.import[?(@.name == 'Red')]"
|
//@ has "$.index[*].inner.import[?(@.name == 'Red')]"
|
||||||
pub use color::Color::Red;
|
pub use color::Color::Red;
|
||||||
|
|
||||||
// @!has "$.index[*][?(@.name == 'Red')]"
|
//@ !has "$.index[*][?(@.name == 'Red')]"
|
||||||
// @!has "$.index[*][?(@.name == 'Color')]"
|
//@ !has "$.index[*][?(@.name == 'Color')]"
|
||||||
|
|
|
@ -15,24 +15,24 @@ pub enum Foo {
|
||||||
Vll9,
|
Vll9,
|
||||||
}
|
}
|
||||||
|
|
||||||
// @set 0 = '$.index[*][?(@.name == "Ews0")].id'
|
//@ set 0 = '$.index[*][?(@.name == "Ews0")].id'
|
||||||
// @set 1 = '$.index[*][?(@.name == "Dik1")].id'
|
//@ set 1 = '$.index[*][?(@.name == "Dik1")].id'
|
||||||
// @set 2 = '$.index[*][?(@.name == "Hsk2")].id'
|
//@ set 2 = '$.index[*][?(@.name == "Hsk2")].id'
|
||||||
// @set 3 = '$.index[*][?(@.name == "Djt3")].id'
|
//@ set 3 = '$.index[*][?(@.name == "Djt3")].id'
|
||||||
// @set 4 = '$.index[*][?(@.name == "Jnr4")].id'
|
//@ set 4 = '$.index[*][?(@.name == "Jnr4")].id'
|
||||||
// @set 5 = '$.index[*][?(@.name == "Dfs5")].id'
|
//@ set 5 = '$.index[*][?(@.name == "Dfs5")].id'
|
||||||
// @set 6 = '$.index[*][?(@.name == "Bja6")].id'
|
//@ set 6 = '$.index[*][?(@.name == "Bja6")].id'
|
||||||
// @set 7 = '$.index[*][?(@.name == "Lyc7")].id'
|
//@ set 7 = '$.index[*][?(@.name == "Lyc7")].id'
|
||||||
// @set 8 = '$.index[*][?(@.name == "Yqd8")].id'
|
//@ set 8 = '$.index[*][?(@.name == "Yqd8")].id'
|
||||||
// @set 9 = '$.index[*][?(@.name == "Vll9")].id'
|
//@ set 9 = '$.index[*][?(@.name == "Vll9")].id'
|
||||||
|
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.enum.variants[0]' $0
|
//@ is '$.index[*][?(@.name == "Foo")].inner.enum.variants[0]' $0
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.enum.variants[1]' $1
|
//@ is '$.index[*][?(@.name == "Foo")].inner.enum.variants[1]' $1
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.enum.variants[2]' $2
|
//@ is '$.index[*][?(@.name == "Foo")].inner.enum.variants[2]' $2
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.enum.variants[3]' $3
|
//@ is '$.index[*][?(@.name == "Foo")].inner.enum.variants[3]' $3
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.enum.variants[4]' $4
|
//@ is '$.index[*][?(@.name == "Foo")].inner.enum.variants[4]' $4
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.enum.variants[5]' $5
|
//@ is '$.index[*][?(@.name == "Foo")].inner.enum.variants[5]' $5
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.enum.variants[6]' $6
|
//@ is '$.index[*][?(@.name == "Foo")].inner.enum.variants[6]' $6
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.enum.variants[7]' $7
|
//@ is '$.index[*][?(@.name == "Foo")].inner.enum.variants[7]' $7
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.enum.variants[8]' $8
|
//@ is '$.index[*][?(@.name == "Foo")].inner.enum.variants[8]' $8
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.enum.variants[9]' $9
|
//@ is '$.index[*][?(@.name == "Foo")].inner.enum.variants[9]' $9
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
// @is "$.index[*][?(@.name=='EnumStruct')].visibility" \"public\"
|
//@ is "$.index[*][?(@.name=='EnumStruct')].visibility" \"public\"
|
||||||
// @has "$.index[*][?(@.name=='EnumStruct')].inner.enum"
|
//@ has "$.index[*][?(@.name=='EnumStruct')].inner.enum"
|
||||||
pub enum EnumStruct {
|
pub enum EnumStruct {
|
||||||
// @has "$.index[*][?(@.name=='x')].inner.struct_field"
|
//@ has "$.index[*][?(@.name=='x')].inner.struct_field"
|
||||||
// @set x = "$.index[*][?(@.name=='x')].id"
|
//@ set x = "$.index[*][?(@.name=='x')].id"
|
||||||
// @has "$.index[*][?(@.name=='y')].inner.struct_field"
|
//@ has "$.index[*][?(@.name=='y')].inner.struct_field"
|
||||||
// @set y = "$.index[*][?(@.name=='y')].id"
|
//@ set y = "$.index[*][?(@.name=='y')].id"
|
||||||
// @ismany "$.index[*][?(@.name=='VariantS')].inner.variant.kind.struct.fields[*]" $x $y
|
//@ ismany "$.index[*][?(@.name=='VariantS')].inner.variant.kind.struct.fields[*]" $x $y
|
||||||
VariantS { x: u32, y: String },
|
VariantS { x: u32, y: String },
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
// @is "$.index[*][?(@.name=='EnumTupleStruct')].visibility" \"public\"
|
//@ is "$.index[*][?(@.name=='EnumTupleStruct')].visibility" \"public\"
|
||||||
// @has "$.index[*][?(@.name=='EnumTupleStruct')].inner.enum"
|
//@ has "$.index[*][?(@.name=='EnumTupleStruct')].inner.enum"
|
||||||
pub enum EnumTupleStruct {
|
pub enum EnumTupleStruct {
|
||||||
// @has "$.index[*][?(@.name=='0')].inner.struct_field"
|
//@ has "$.index[*][?(@.name=='0')].inner.struct_field"
|
||||||
// @set f0 = "$.index[*][?(@.name=='0')].id"
|
//@ set f0 = "$.index[*][?(@.name=='0')].id"
|
||||||
// @has "$.index[*][?(@.name=='1')].inner.struct_field"
|
//@ has "$.index[*][?(@.name=='1')].inner.struct_field"
|
||||||
// @set f1 = "$.index[*][?(@.name=='1')].id"
|
//@ set f1 = "$.index[*][?(@.name=='1')].id"
|
||||||
// @ismany "$.index[*][?(@.name=='VariantA')].inner.variant.kind.tuple[*]" $f0 $f1
|
//@ ismany "$.index[*][?(@.name=='VariantA')].inner.variant.kind.tuple[*]" $f0 $f1
|
||||||
VariantA(u32, String),
|
VariantA(u32, String),
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,23 +2,23 @@
|
||||||
|
|
||||||
#![feature(abi_vectorcall)]
|
#![feature(abi_vectorcall)]
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='AbiRust')].inner.type_alias.type.function_pointer.header.abi" \"Rust\"
|
//@ is "$.index[*][?(@.name=='AbiRust')].inner.type_alias.type.function_pointer.header.abi" \"Rust\"
|
||||||
pub type AbiRust = fn();
|
pub type AbiRust = fn();
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='AbiC')].inner.type_alias.type.function_pointer.header.abi" '{"C": {"unwind": false}}'
|
//@ is "$.index[*][?(@.name=='AbiC')].inner.type_alias.type.function_pointer.header.abi" '{"C": {"unwind": false}}'
|
||||||
pub type AbiC = extern "C" fn();
|
pub type AbiC = extern "C" fn();
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='AbiSystem')].inner.type_alias.type.function_pointer.header.abi" '{"System": {"unwind": false}}'
|
//@ is "$.index[*][?(@.name=='AbiSystem')].inner.type_alias.type.function_pointer.header.abi" '{"System": {"unwind": false}}'
|
||||||
pub type AbiSystem = extern "system" fn();
|
pub type AbiSystem = extern "system" fn();
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='AbiCUnwind')].inner.type_alias.type.function_pointer.header.abi" '{"C": {"unwind": true}}'
|
//@ is "$.index[*][?(@.name=='AbiCUnwind')].inner.type_alias.type.function_pointer.header.abi" '{"C": {"unwind": true}}'
|
||||||
pub type AbiCUnwind = extern "C-unwind" fn();
|
pub type AbiCUnwind = extern "C-unwind" fn();
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='AbiSystemUnwind')].inner.type_alias.type.function_pointer.header.abi" '{"System": {"unwind": true}}'
|
//@ is "$.index[*][?(@.name=='AbiSystemUnwind')].inner.type_alias.type.function_pointer.header.abi" '{"System": {"unwind": true}}'
|
||||||
pub type AbiSystemUnwind = extern "system-unwind" fn();
|
pub type AbiSystemUnwind = extern "system-unwind" fn();
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='AbiVecorcall')].inner.type_alias.type.function_pointer.header.abi.Other" '"\"vectorcall\""'
|
//@ is "$.index[*][?(@.name=='AbiVecorcall')].inner.type_alias.type.function_pointer.header.abi.Other" '"\"vectorcall\""'
|
||||||
pub type AbiVecorcall = extern "vectorcall" fn();
|
pub type AbiVecorcall = extern "vectorcall" fn();
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='AbiVecorcallUnwind')].inner.type_alias.type.function_pointer.header.abi.Other" '"\"vectorcall-unwind\""'
|
//@ is "$.index[*][?(@.name=='AbiVecorcallUnwind')].inner.type_alias.type.function_pointer.header.abi.Other" '"\"vectorcall-unwind\""'
|
||||||
pub type AbiVecorcallUnwind = extern "vectorcall-unwind" fn();
|
pub type AbiVecorcallUnwind = extern "vectorcall-unwind" fn();
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
// ignore-tidy-linelength
|
// ignore-tidy-linelength
|
||||||
|
|
||||||
// @count "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.decl.inputs[*]" 1
|
//@ count "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.decl.inputs[*]" 1
|
||||||
// @is "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.decl.inputs[0][0]" '"val"'
|
//@ is "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.decl.inputs[0][0]" '"val"'
|
||||||
// @is "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.decl.inputs[0][1].borrowed_ref.lifetime" \"\'c\"
|
//@ is "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.decl.inputs[0][1].borrowed_ref.lifetime" \"\'c\"
|
||||||
// @is "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.decl.output.primitive" \"i32\"
|
//@ is "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.decl.output.primitive" \"i32\"
|
||||||
// @count "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.generic_params[*]" 1
|
//@ count "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.generic_params[*]" 1
|
||||||
// @is "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.generic_params[0].name" \"\'c\"
|
//@ is "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.generic_params[0].name" \"\'c\"
|
||||||
// @is "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.generic_params[0].kind" '{ "lifetime": { "outlives": [] } }'
|
//@ is "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.generic_params[0].kind" '{ "lifetime": { "outlives": [] } }'
|
||||||
pub type WithHigherRankTraitBounds = for<'c> fn(val: &'c i32) -> i32;
|
pub type WithHigherRankTraitBounds = for<'c> fn(val: &'c i32) -> i32;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
// ignore-tidy-linelength
|
// ignore-tidy-linelength
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='FnPointer')].inner.type_alias.type.function_pointer.header.unsafe" false
|
//@ is "$.index[*][?(@.name=='FnPointer')].inner.type_alias.type.function_pointer.header.unsafe" false
|
||||||
// @is "$.index[*][?(@.name=='FnPointer')].inner.type_alias.type.function_pointer.header.const" false
|
//@ is "$.index[*][?(@.name=='FnPointer')].inner.type_alias.type.function_pointer.header.const" false
|
||||||
// @is "$.index[*][?(@.name=='FnPointer')].inner.type_alias.type.function_pointer.header.async" false
|
//@ is "$.index[*][?(@.name=='FnPointer')].inner.type_alias.type.function_pointer.header.async" false
|
||||||
pub type FnPointer = fn();
|
pub type FnPointer = fn();
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='UnsafePointer')].inner.type_alias.type.function_pointer.header.unsafe" true
|
//@ is "$.index[*][?(@.name=='UnsafePointer')].inner.type_alias.type.function_pointer.header.unsafe" true
|
||||||
// @is "$.index[*][?(@.name=='UnsafePointer')].inner.type_alias.type.function_pointer.header.const" false
|
//@ is "$.index[*][?(@.name=='UnsafePointer')].inner.type_alias.type.function_pointer.header.const" false
|
||||||
// @is "$.index[*][?(@.name=='UnsafePointer')].inner.type_alias.type.function_pointer.header.async" false
|
//@ is "$.index[*][?(@.name=='UnsafePointer')].inner.type_alias.type.function_pointer.header.async" false
|
||||||
pub type UnsafePointer = unsafe fn();
|
pub type UnsafePointer = unsafe fn();
|
||||||
|
|
|
@ -2,23 +2,23 @@
|
||||||
|
|
||||||
#![feature(abi_vectorcall)]
|
#![feature(abi_vectorcall)]
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='abi_rust')].inner.function.header.abi" \"Rust\"
|
//@ is "$.index[*][?(@.name=='abi_rust')].inner.function.header.abi" \"Rust\"
|
||||||
pub fn abi_rust() {}
|
pub fn abi_rust() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='abi_c')].inner.function.header.abi" '{"C": {"unwind": false}}'
|
//@ is "$.index[*][?(@.name=='abi_c')].inner.function.header.abi" '{"C": {"unwind": false}}'
|
||||||
pub extern "C" fn abi_c() {}
|
pub extern "C" fn abi_c() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='abi_system')].inner.function.header.abi" '{"System": {"unwind": false}}'
|
//@ is "$.index[*][?(@.name=='abi_system')].inner.function.header.abi" '{"System": {"unwind": false}}'
|
||||||
pub extern "system" fn abi_system() {}
|
pub extern "system" fn abi_system() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='abi_c_unwind')].inner.function.header.abi" '{"C": {"unwind": true}}'
|
//@ is "$.index[*][?(@.name=='abi_c_unwind')].inner.function.header.abi" '{"C": {"unwind": true}}'
|
||||||
pub extern "C-unwind" fn abi_c_unwind() {}
|
pub extern "C-unwind" fn abi_c_unwind() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='abi_system_unwind')].inner.function.header.abi" '{"System": {"unwind": true}}'
|
//@ is "$.index[*][?(@.name=='abi_system_unwind')].inner.function.header.abi" '{"System": {"unwind": true}}'
|
||||||
pub extern "system-unwind" fn abi_system_unwind() {}
|
pub extern "system-unwind" fn abi_system_unwind() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='abi_vectorcall')].inner.function.header.abi.Other" '"\"vectorcall\""'
|
//@ is "$.index[*][?(@.name=='abi_vectorcall')].inner.function.header.abi.Other" '"\"vectorcall\""'
|
||||||
pub extern "vectorcall" fn abi_vectorcall() {}
|
pub extern "vectorcall" fn abi_vectorcall() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='abi_vectorcall_unwind')].inner.function.header.abi.Other" '"\"vectorcall-unwind\""'
|
//@ is "$.index[*][?(@.name=='abi_vectorcall_unwind')].inner.function.header.abi.Other" '"\"vectorcall-unwind\""'
|
||||||
pub extern "vectorcall-unwind" fn abi_vectorcall_unwind() {}
|
pub extern "vectorcall-unwind" fn abi_vectorcall_unwind() {}
|
||||||
|
|
|
@ -5,30 +5,30 @@
|
||||||
|
|
||||||
use std::future::Future;
|
use std::future::Future;
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='get_int')].inner.function.decl.output.primitive" \"i32\"
|
//@ is "$.index[*][?(@.name=='get_int')].inner.function.decl.output.primitive" \"i32\"
|
||||||
// @is "$.index[*][?(@.name=='get_int')].inner.function.header.async" false
|
//@ is "$.index[*][?(@.name=='get_int')].inner.function.header.async" false
|
||||||
pub fn get_int() -> i32 {
|
pub fn get_int() -> i32 {
|
||||||
42
|
42
|
||||||
}
|
}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='get_int_async')].inner.function.decl.output.primitive" \"i32\"
|
//@ is "$.index[*][?(@.name=='get_int_async')].inner.function.decl.output.primitive" \"i32\"
|
||||||
// @is "$.index[*][?(@.name=='get_int_async')].inner.function.header.async" true
|
//@ is "$.index[*][?(@.name=='get_int_async')].inner.function.header.async" true
|
||||||
pub async fn get_int_async() -> i32 {
|
pub async fn get_int_async() -> i32 {
|
||||||
42
|
42
|
||||||
}
|
}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='get_int_future')].inner.function.decl.output.impl_trait[0].trait_bound.trait.name" '"Future"'
|
//@ is "$.index[*][?(@.name=='get_int_future')].inner.function.decl.output.impl_trait[0].trait_bound.trait.name" '"Future"'
|
||||||
// @is "$.index[*][?(@.name=='get_int_future')].inner.function.decl.output.impl_trait[0].trait_bound.trait.args.angle_bracketed.bindings[0].name" '"Output"'
|
//@ is "$.index[*][?(@.name=='get_int_future')].inner.function.decl.output.impl_trait[0].trait_bound.trait.args.angle_bracketed.bindings[0].name" '"Output"'
|
||||||
// @is "$.index[*][?(@.name=='get_int_future')].inner.function.decl.output.impl_trait[0].trait_bound.trait.args.angle_bracketed.bindings[0].binding.equality.type.primitive" \"i32\"
|
//@ is "$.index[*][?(@.name=='get_int_future')].inner.function.decl.output.impl_trait[0].trait_bound.trait.args.angle_bracketed.bindings[0].binding.equality.type.primitive" \"i32\"
|
||||||
// @is "$.index[*][?(@.name=='get_int_future')].inner.function.header.async" false
|
//@ is "$.index[*][?(@.name=='get_int_future')].inner.function.header.async" false
|
||||||
pub fn get_int_future() -> impl Future<Output = i32> {
|
pub fn get_int_future() -> impl Future<Output = i32> {
|
||||||
async { 42 }
|
async { 42 }
|
||||||
}
|
}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='get_int_future_async')].inner.function.decl.output.impl_trait[0].trait_bound.trait.name" '"Future"'
|
//@ is "$.index[*][?(@.name=='get_int_future_async')].inner.function.decl.output.impl_trait[0].trait_bound.trait.name" '"Future"'
|
||||||
// @is "$.index[*][?(@.name=='get_int_future_async')].inner.function.decl.output.impl_trait[0].trait_bound.trait.args.angle_bracketed.bindings[0].name" '"Output"'
|
//@ is "$.index[*][?(@.name=='get_int_future_async')].inner.function.decl.output.impl_trait[0].trait_bound.trait.args.angle_bracketed.bindings[0].name" '"Output"'
|
||||||
// @is "$.index[*][?(@.name=='get_int_future_async')].inner.function.decl.output.impl_trait[0].trait_bound.trait.args.angle_bracketed.bindings[0].binding.equality.type.primitive" \"i32\"
|
//@ is "$.index[*][?(@.name=='get_int_future_async')].inner.function.decl.output.impl_trait[0].trait_bound.trait.args.angle_bracketed.bindings[0].binding.equality.type.primitive" \"i32\"
|
||||||
// @is "$.index[*][?(@.name=='get_int_future_async')].inner.function.header.async" true
|
//@ is "$.index[*][?(@.name=='get_int_future_async')].inner.function.header.async" true
|
||||||
pub async fn get_int_future_async() -> impl Future<Output = i32> {
|
pub async fn get_int_future_async() -> impl Future<Output = i32> {
|
||||||
async { 42 }
|
async { 42 }
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
// @is "$.index[*][?(@.name == 'not_variadic')].inner.function.decl.c_variadic" false
|
//@ is "$.index[*][?(@.name == 'not_variadic')].inner.function.decl.c_variadic" false
|
||||||
pub fn not_variadic(_: i32);
|
pub fn not_variadic(_: i32);
|
||||||
// @is "$.index[*][?(@.name == 'variadic')].inner.function.decl.c_variadic" true
|
//@ is "$.index[*][?(@.name == 'variadic')].inner.function.decl.c_variadic" true
|
||||||
pub fn variadic(_: i32, ...);
|
pub fn variadic(_: i32, ...);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,60 +1,60 @@
|
||||||
// ignore-tidy-linelength
|
// ignore-tidy-linelength
|
||||||
|
|
||||||
// @set foo = "$.index[*][?(@.name=='Foo')].id"
|
//@ set foo = "$.index[*][?(@.name=='Foo')].id"
|
||||||
pub trait Foo {}
|
pub trait Foo {}
|
||||||
|
|
||||||
// @set generic_foo = "$.index[*][?(@.name=='GenericFoo')].id"
|
//@ set generic_foo = "$.index[*][?(@.name=='GenericFoo')].id"
|
||||||
pub trait GenericFoo<'a> {}
|
pub trait GenericFoo<'a> {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='generics')].inner.function.generics.where_predicates" "[]"
|
//@ is "$.index[*][?(@.name=='generics')].inner.function.generics.where_predicates" "[]"
|
||||||
// @count "$.index[*][?(@.name=='generics')].inner.function.generics.params[*]" 1
|
//@ count "$.index[*][?(@.name=='generics')].inner.function.generics.params[*]" 1
|
||||||
// @is "$.index[*][?(@.name=='generics')].inner.function.generics.params[0].name" '"F"'
|
//@ is "$.index[*][?(@.name=='generics')].inner.function.generics.params[0].name" '"F"'
|
||||||
// @is "$.index[*][?(@.name=='generics')].inner.function.generics.params[0].kind.type.default" 'null'
|
//@ is "$.index[*][?(@.name=='generics')].inner.function.generics.params[0].kind.type.default" 'null'
|
||||||
// @count "$.index[*][?(@.name=='generics')].inner.function.generics.params[0].kind.type.bounds[*]" 1
|
//@ count "$.index[*][?(@.name=='generics')].inner.function.generics.params[0].kind.type.bounds[*]" 1
|
||||||
// @is "$.index[*][?(@.name=='generics')].inner.function.generics.params[0].kind.type.bounds[0].trait_bound.trait.id" '$foo'
|
//@ is "$.index[*][?(@.name=='generics')].inner.function.generics.params[0].kind.type.bounds[0].trait_bound.trait.id" '$foo'
|
||||||
// @count "$.index[*][?(@.name=='generics')].inner.function.decl.inputs[*]" 1
|
//@ count "$.index[*][?(@.name=='generics')].inner.function.decl.inputs[*]" 1
|
||||||
// @is "$.index[*][?(@.name=='generics')].inner.function.decl.inputs[0][0]" '"f"'
|
//@ is "$.index[*][?(@.name=='generics')].inner.function.decl.inputs[0][0]" '"f"'
|
||||||
// @is "$.index[*][?(@.name=='generics')].inner.function.decl.inputs[0][1].generic" '"F"'
|
//@ is "$.index[*][?(@.name=='generics')].inner.function.decl.inputs[0][1].generic" '"F"'
|
||||||
pub fn generics<F: Foo>(f: F) {}
|
pub fn generics<F: Foo>(f: F) {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='impl_trait')].inner.function.generics.where_predicates" "[]"
|
//@ is "$.index[*][?(@.name=='impl_trait')].inner.function.generics.where_predicates" "[]"
|
||||||
// @count "$.index[*][?(@.name=='impl_trait')].inner.function.generics.params[*]" 1
|
//@ count "$.index[*][?(@.name=='impl_trait')].inner.function.generics.params[*]" 1
|
||||||
// @is "$.index[*][?(@.name=='impl_trait')].inner.function.generics.params[0].name" '"impl Foo"'
|
//@ is "$.index[*][?(@.name=='impl_trait')].inner.function.generics.params[0].name" '"impl Foo"'
|
||||||
// @is "$.index[*][?(@.name=='impl_trait')].inner.function.generics.params[0].kind.type.bounds[0].trait_bound.trait.id" $foo
|
//@ is "$.index[*][?(@.name=='impl_trait')].inner.function.generics.params[0].kind.type.bounds[0].trait_bound.trait.id" $foo
|
||||||
// @count "$.index[*][?(@.name=='impl_trait')].inner.function.decl.inputs[*]" 1
|
//@ count "$.index[*][?(@.name=='impl_trait')].inner.function.decl.inputs[*]" 1
|
||||||
// @is "$.index[*][?(@.name=='impl_trait')].inner.function.decl.inputs[0][0]" '"f"'
|
//@ is "$.index[*][?(@.name=='impl_trait')].inner.function.decl.inputs[0][0]" '"f"'
|
||||||
// @count "$.index[*][?(@.name=='impl_trait')].inner.function.decl.inputs[0][1].impl_trait[*]" 1
|
//@ count "$.index[*][?(@.name=='impl_trait')].inner.function.decl.inputs[0][1].impl_trait[*]" 1
|
||||||
// @is "$.index[*][?(@.name=='impl_trait')].inner.function.decl.inputs[0][1].impl_trait[0].trait_bound.trait.id" $foo
|
//@ is "$.index[*][?(@.name=='impl_trait')].inner.function.decl.inputs[0][1].impl_trait[0].trait_bound.trait.id" $foo
|
||||||
pub fn impl_trait(f: impl Foo) {}
|
pub fn impl_trait(f: impl Foo) {}
|
||||||
|
|
||||||
// @count "$.index[*][?(@.name=='where_clase')].inner.function.generics.params[*]" 3
|
//@ count "$.index[*][?(@.name=='where_clase')].inner.function.generics.params[*]" 3
|
||||||
// @is "$.index[*][?(@.name=='where_clase')].inner.function.generics.params[0].name" '"F"'
|
//@ is "$.index[*][?(@.name=='where_clase')].inner.function.generics.params[0].name" '"F"'
|
||||||
// @is "$.index[*][?(@.name=='where_clase')].inner.function.generics.params[0].kind" '{"type": {"bounds": [], "default": null, "synthetic": false}}'
|
//@ is "$.index[*][?(@.name=='where_clase')].inner.function.generics.params[0].kind" '{"type": {"bounds": [], "default": null, "synthetic": false}}'
|
||||||
// @count "$.index[*][?(@.name=='where_clase')].inner.function.decl.inputs[*]" 3
|
//@ count "$.index[*][?(@.name=='where_clase')].inner.function.decl.inputs[*]" 3
|
||||||
// @is "$.index[*][?(@.name=='where_clase')].inner.function.decl.inputs[0][0]" '"f"'
|
//@ is "$.index[*][?(@.name=='where_clase')].inner.function.decl.inputs[0][0]" '"f"'
|
||||||
// @is "$.index[*][?(@.name=='where_clase')].inner.function.decl.inputs[0][1].generic" '"F"'
|
//@ is "$.index[*][?(@.name=='where_clase')].inner.function.decl.inputs[0][1].generic" '"F"'
|
||||||
// @count "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[*]" 3
|
//@ count "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[*]" 3
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[0].bound_predicate.type.generic" \"F\"
|
//@ is "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[0].bound_predicate.type.generic" \"F\"
|
||||||
// @count "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[0].bound_predicate.bounds[*]" 1
|
//@ count "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[0].bound_predicate.bounds[*]" 1
|
||||||
// @is "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[0].bound_predicate.bounds[0].trait_bound.trait.id" $foo
|
//@ is "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[0].bound_predicate.bounds[0].trait_bound.trait.id" $foo
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[1].bound_predicate.type.generic" \"G\"
|
//@ is "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[1].bound_predicate.type.generic" \"G\"
|
||||||
// @count "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[1].bound_predicate.bounds[*]" 1
|
//@ count "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[1].bound_predicate.bounds[*]" 1
|
||||||
// @is "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[1].bound_predicate.bounds[0].trait_bound.trait.id" $generic_foo
|
//@ is "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[1].bound_predicate.bounds[0].trait_bound.trait.id" $generic_foo
|
||||||
// @count "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[1].bound_predicate.bounds[0].trait_bound.generic_params[*]" 1
|
//@ count "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[1].bound_predicate.bounds[0].trait_bound.generic_params[*]" 1
|
||||||
// @is "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[1].bound_predicate.bounds[0].trait_bound.generic_params[0].name" \"\'a\"
|
//@ is "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[1].bound_predicate.bounds[0].trait_bound.generic_params[0].name" \"\'a\"
|
||||||
// @is "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[1].bound_predicate.bounds[0].trait_bound.generic_params[0].kind.lifetime.outlives" "[]"
|
//@ is "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[1].bound_predicate.bounds[0].trait_bound.generic_params[0].kind.lifetime.outlives" "[]"
|
||||||
// @is "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[1].bound_predicate.generic_params" "[]"
|
//@ is "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[1].bound_predicate.generic_params" "[]"
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[2].bound_predicate.type.borrowed_ref.lifetime" \"\'b\"
|
//@ is "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[2].bound_predicate.type.borrowed_ref.lifetime" \"\'b\"
|
||||||
// @is "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[2].bound_predicate.type.borrowed_ref.type.generic" \"H\"
|
//@ is "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[2].bound_predicate.type.borrowed_ref.type.generic" \"H\"
|
||||||
// @count "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[2].bound_predicate.bounds[*]" 1
|
//@ count "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[2].bound_predicate.bounds[*]" 1
|
||||||
// @is "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[2].bound_predicate.bounds[0].trait_bound.trait.id" $foo
|
//@ is "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[2].bound_predicate.bounds[0].trait_bound.trait.id" $foo
|
||||||
// @is "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[2].bound_predicate.bounds[0].trait_bound.generic_params" "[]"
|
//@ is "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[2].bound_predicate.bounds[0].trait_bound.generic_params" "[]"
|
||||||
// @count "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[2].bound_predicate.generic_params[*]" 1
|
//@ count "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[2].bound_predicate.generic_params[*]" 1
|
||||||
// @is "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[2].bound_predicate.generic_params[0].name" \"\'b\"
|
//@ is "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[2].bound_predicate.generic_params[0].name" \"\'b\"
|
||||||
// @is "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[2].bound_predicate.generic_params[0].kind.lifetime.outlives" "[]"
|
//@ is "$.index[*][?(@.name=='where_clase')].inner.function.generics.where_predicates[2].bound_predicate.generic_params[0].kind.lifetime.outlives" "[]"
|
||||||
pub fn where_clase<F, G, H>(f: F, g: G, h: H)
|
pub fn where_clase<F, G, H>(f: F, g: G, h: H)
|
||||||
where
|
where
|
||||||
F: Foo,
|
F: Foo,
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
// ignore-tidy-linelength
|
// ignore-tidy-linelength
|
||||||
|
|
||||||
// @count "$.index[*][?(@.name=='generic_returns')].inner.module.items[*]" 2
|
//@ count "$.index[*][?(@.name=='generic_returns')].inner.module.items[*]" 2
|
||||||
|
|
||||||
// @set foo = "$.index[*][?(@.name=='Foo')].id"
|
//@ set foo = "$.index[*][?(@.name=='Foo')].id"
|
||||||
pub trait Foo {}
|
pub trait Foo {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='get_foo')].inner.function.decl.inputs" []
|
//@ is "$.index[*][?(@.name=='get_foo')].inner.function.decl.inputs" []
|
||||||
// @count "$.index[*][?(@.name=='get_foo')].inner.function.decl.output.impl_trait[*]" 1
|
//@ count "$.index[*][?(@.name=='get_foo')].inner.function.decl.output.impl_trait[*]" 1
|
||||||
// @is "$.index[*][?(@.name=='get_foo')].inner.function.decl.output.impl_trait[0].trait_bound.trait.id" $foo
|
//@ is "$.index[*][?(@.name=='get_foo')].inner.function.decl.output.impl_trait[0].trait_bound.trait.id" $foo
|
||||||
pub fn get_foo() -> impl Foo {
|
pub fn get_foo() -> impl Foo {
|
||||||
Fooer {}
|
Fooer {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
// ignore-tidy-linelength
|
// ignore-tidy-linelength
|
||||||
|
|
||||||
// @set wham_id = "$.index[*][?(@.name=='Wham')].id"
|
//@ set wham_id = "$.index[*][?(@.name=='Wham')].id"
|
||||||
pub trait Wham {}
|
pub trait Wham {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='one_generic_param_fn')].inner.function.generics.where_predicates" []
|
//@ is "$.index[*][?(@.name=='one_generic_param_fn')].inner.function.generics.where_predicates" []
|
||||||
// @count "$.index[*][?(@.name=='one_generic_param_fn')].inner.function.generics.params[*]" 1
|
//@ count "$.index[*][?(@.name=='one_generic_param_fn')].inner.function.generics.params[*]" 1
|
||||||
// @is "$.index[*][?(@.name=='one_generic_param_fn')].inner.function.generics.params[0].name" '"T"'
|
//@ is "$.index[*][?(@.name=='one_generic_param_fn')].inner.function.generics.params[0].name" '"T"'
|
||||||
// @is "$.index[*][?(@.name=='one_generic_param_fn')].inner.function.generics.params[0].kind.type.synthetic" false
|
//@ is "$.index[*][?(@.name=='one_generic_param_fn')].inner.function.generics.params[0].kind.type.synthetic" false
|
||||||
// @is "$.index[*][?(@.name=='one_generic_param_fn')].inner.function.generics.params[0].kind.type.bounds[0].trait_bound.trait.id" $wham_id
|
//@ is "$.index[*][?(@.name=='one_generic_param_fn')].inner.function.generics.params[0].kind.type.bounds[0].trait_bound.trait.id" $wham_id
|
||||||
// @is "$.index[*][?(@.name=='one_generic_param_fn')].inner.function.decl.inputs" '[["w", {"generic": "T"}]]'
|
//@ is "$.index[*][?(@.name=='one_generic_param_fn')].inner.function.decl.inputs" '[["w", {"generic": "T"}]]'
|
||||||
pub fn one_generic_param_fn<T: Wham>(w: T) {}
|
pub fn one_generic_param_fn<T: Wham>(w: T) {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='one_synthetic_generic_param_fn')].inner.function.generics.where_predicates" []
|
//@ is "$.index[*][?(@.name=='one_synthetic_generic_param_fn')].inner.function.generics.where_predicates" []
|
||||||
// @count "$.index[*][?(@.name=='one_synthetic_generic_param_fn')].inner.function.generics.params[*]" 1
|
//@ count "$.index[*][?(@.name=='one_synthetic_generic_param_fn')].inner.function.generics.params[*]" 1
|
||||||
// @is "$.index[*][?(@.name=='one_synthetic_generic_param_fn')].inner.function.generics.params[0].name" '"impl Wham"'
|
//@ is "$.index[*][?(@.name=='one_synthetic_generic_param_fn')].inner.function.generics.params[0].name" '"impl Wham"'
|
||||||
// @is "$.index[*][?(@.name=='one_synthetic_generic_param_fn')].inner.function.generics.params[0].kind.type.synthetic" true
|
//@ is "$.index[*][?(@.name=='one_synthetic_generic_param_fn')].inner.function.generics.params[0].kind.type.synthetic" true
|
||||||
// @is "$.index[*][?(@.name=='one_synthetic_generic_param_fn')].inner.function.generics.params[0].kind.type.bounds[0].trait_bound.trait.id" $wham_id
|
//@ is "$.index[*][?(@.name=='one_synthetic_generic_param_fn')].inner.function.generics.params[0].kind.type.bounds[0].trait_bound.trait.id" $wham_id
|
||||||
// @count "$.index[*][?(@.name=='one_synthetic_generic_param_fn')].inner.function.decl.inputs[*]" 1
|
//@ count "$.index[*][?(@.name=='one_synthetic_generic_param_fn')].inner.function.decl.inputs[*]" 1
|
||||||
// @is "$.index[*][?(@.name=='one_synthetic_generic_param_fn')].inner.function.decl.inputs[0][0]" '"w"'
|
//@ is "$.index[*][?(@.name=='one_synthetic_generic_param_fn')].inner.function.decl.inputs[0][0]" '"w"'
|
||||||
// @is "$.index[*][?(@.name=='one_synthetic_generic_param_fn')].inner.function.decl.inputs[0][1].impl_trait[0].trait_bound.trait.id" $wham_id
|
//@ is "$.index[*][?(@.name=='one_synthetic_generic_param_fn')].inner.function.decl.inputs[0][1].impl_trait[0].trait_bound.trait.id" $wham_id
|
||||||
pub fn one_synthetic_generic_param_fn(w: impl Wham) {}
|
pub fn one_synthetic_generic_param_fn(w: impl Wham) {}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// @is "$.index[*][?(@.name=='fst')].inner.function.decl.inputs[0][0]" '"(x, _)"'
|
//@ is "$.index[*][?(@.name=='fst')].inner.function.decl.inputs[0][0]" '"(x, _)"'
|
||||||
pub fn fst<X, Y>((x, _): (X, Y)) -> X {
|
pub fn fst<X, Y>((x, _): (X, Y)) -> X {
|
||||||
x
|
x
|
||||||
}
|
}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='drop_int')].inner.function.decl.inputs[0][0]" '"_"'
|
//@ is "$.index[*][?(@.name=='drop_int')].inner.function.decl.inputs[0][0]" '"_"'
|
||||||
pub fn drop_int(_: i32) {}
|
pub fn drop_int(_: i32) {}
|
||||||
|
|
|
@ -1,33 +1,33 @@
|
||||||
//@ edition:2018
|
//@ edition:2018
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='nothing_fn')].inner.function.header.async" false
|
//@ is "$.index[*][?(@.name=='nothing_fn')].inner.function.header.async" false
|
||||||
// @is "$.index[*][?(@.name=='nothing_fn')].inner.function.header.const" false
|
//@ is "$.index[*][?(@.name=='nothing_fn')].inner.function.header.const" false
|
||||||
// @is "$.index[*][?(@.name=='nothing_fn')].inner.function.header.unsafe" false
|
//@ is "$.index[*][?(@.name=='nothing_fn')].inner.function.header.unsafe" false
|
||||||
pub fn nothing_fn() {}
|
pub fn nothing_fn() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='unsafe_fn')].inner.function.header.async" false
|
//@ is "$.index[*][?(@.name=='unsafe_fn')].inner.function.header.async" false
|
||||||
// @is "$.index[*][?(@.name=='unsafe_fn')].inner.function.header.const" false
|
//@ is "$.index[*][?(@.name=='unsafe_fn')].inner.function.header.const" false
|
||||||
// @is "$.index[*][?(@.name=='unsafe_fn')].inner.function.header.unsafe" true
|
//@ is "$.index[*][?(@.name=='unsafe_fn')].inner.function.header.unsafe" true
|
||||||
pub unsafe fn unsafe_fn() {}
|
pub unsafe fn unsafe_fn() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='const_fn')].inner.function.header.async" false
|
//@ is "$.index[*][?(@.name=='const_fn')].inner.function.header.async" false
|
||||||
// @is "$.index[*][?(@.name=='const_fn')].inner.function.header.const" true
|
//@ is "$.index[*][?(@.name=='const_fn')].inner.function.header.const" true
|
||||||
// @is "$.index[*][?(@.name=='const_fn')].inner.function.header.unsafe" false
|
//@ is "$.index[*][?(@.name=='const_fn')].inner.function.header.unsafe" false
|
||||||
pub const fn const_fn() {}
|
pub const fn const_fn() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='async_fn')].inner.function.header.async" true
|
//@ is "$.index[*][?(@.name=='async_fn')].inner.function.header.async" true
|
||||||
// @is "$.index[*][?(@.name=='async_fn')].inner.function.header.const" false
|
//@ is "$.index[*][?(@.name=='async_fn')].inner.function.header.const" false
|
||||||
// @is "$.index[*][?(@.name=='async_fn')].inner.function.header.unsafe" false
|
//@ is "$.index[*][?(@.name=='async_fn')].inner.function.header.unsafe" false
|
||||||
pub async fn async_fn() {}
|
pub async fn async_fn() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='async_unsafe_fn')].inner.function.header.async" true
|
//@ is "$.index[*][?(@.name=='async_unsafe_fn')].inner.function.header.async" true
|
||||||
// @is "$.index[*][?(@.name=='async_unsafe_fn')].inner.function.header.const" false
|
//@ is "$.index[*][?(@.name=='async_unsafe_fn')].inner.function.header.const" false
|
||||||
// @is "$.index[*][?(@.name=='async_unsafe_fn')].inner.function.header.unsafe" true
|
//@ is "$.index[*][?(@.name=='async_unsafe_fn')].inner.function.header.unsafe" true
|
||||||
pub async unsafe fn async_unsafe_fn() {}
|
pub async unsafe fn async_unsafe_fn() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='const_unsafe_fn')].inner.function.header.async" false
|
//@ is "$.index[*][?(@.name=='const_unsafe_fn')].inner.function.header.async" false
|
||||||
// @is "$.index[*][?(@.name=='const_unsafe_fn')].inner.function.header.const" true
|
//@ is "$.index[*][?(@.name=='const_unsafe_fn')].inner.function.header.const" true
|
||||||
// @is "$.index[*][?(@.name=='const_unsafe_fn')].inner.function.header.unsafe" true
|
//@ is "$.index[*][?(@.name=='const_unsafe_fn')].inner.function.header.unsafe" true
|
||||||
pub const unsafe fn const_unsafe_fn() {}
|
pub const unsafe fn const_unsafe_fn() {}
|
||||||
|
|
||||||
// It's impossible for a function to be both const and async, so no test for that
|
// It's impossible for a function to be both const and async, so no test for that
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
// Regression test for <https://github.com/rust-lang/rust/issues/104851>
|
// Regression test for <https://github.com/rust-lang/rust/issues/104851>
|
||||||
|
|
||||||
/// @set foo = "$.index[*][?(@.name=='Foo')].id"
|
///@ set foo = "$.index[*][?(@.name=='Foo')].id"
|
||||||
pub type Foo = i32;
|
pub type Foo = i32;
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='demo')].inner.function.decl.output.resolved_path.id" $foo
|
//@ is "$.index[*][?(@.name=='demo')].inner.function.decl.output.resolved_path.id" $foo
|
||||||
pub fn demo() -> Foo {
|
pub fn demo() -> Foo {
|
||||||
42
|
42
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,32 +3,32 @@
|
||||||
pub trait Display {}
|
pub trait Display {}
|
||||||
|
|
||||||
pub trait LendingIterator {
|
pub trait LendingIterator {
|
||||||
// @count "$.index[*][?(@.name=='LendingItem')].inner.assoc_type.generics.params[*]" 1
|
//@ count "$.index[*][?(@.name=='LendingItem')].inner.assoc_type.generics.params[*]" 1
|
||||||
// @is "$.index[*][?(@.name=='LendingItem')].inner.assoc_type.generics.params[*].name" \"\'a\"
|
//@ is "$.index[*][?(@.name=='LendingItem')].inner.assoc_type.generics.params[*].name" \"\'a\"
|
||||||
// @count "$.index[*][?(@.name=='LendingItem')].inner.assoc_type.generics.where_predicates[*]" 1
|
//@ count "$.index[*][?(@.name=='LendingItem')].inner.assoc_type.generics.where_predicates[*]" 1
|
||||||
// @is "$.index[*][?(@.name=='LendingItem')].inner.assoc_type.generics.where_predicates[*].bound_predicate.type.generic" \"Self\"
|
//@ is "$.index[*][?(@.name=='LendingItem')].inner.assoc_type.generics.where_predicates[*].bound_predicate.type.generic" \"Self\"
|
||||||
// @is "$.index[*][?(@.name=='LendingItem')].inner.assoc_type.generics.where_predicates[*].bound_predicate.bounds[*].outlives" \"\'a\"
|
//@ is "$.index[*][?(@.name=='LendingItem')].inner.assoc_type.generics.where_predicates[*].bound_predicate.bounds[*].outlives" \"\'a\"
|
||||||
// @count "$.index[*][?(@.name=='LendingItem')].inner.assoc_type.bounds[*]" 1
|
//@ count "$.index[*][?(@.name=='LendingItem')].inner.assoc_type.bounds[*]" 1
|
||||||
type LendingItem<'a>: Display
|
type LendingItem<'a>: Display
|
||||||
where
|
where
|
||||||
Self: 'a;
|
Self: 'a;
|
||||||
|
|
||||||
// @count "$.index[*][?(@.name=='lending_next')].inner.function.decl.output.qualified_path.args.angle_bracketed.args[*]" 1
|
//@ count "$.index[*][?(@.name=='lending_next')].inner.function.decl.output.qualified_path.args.angle_bracketed.args[*]" 1
|
||||||
// @count "$.index[*][?(@.name=='lending_next')].inner.function.decl.output.qualified_path.args.angle_bracketed.bindings[*]" 0
|
//@ count "$.index[*][?(@.name=='lending_next')].inner.function.decl.output.qualified_path.args.angle_bracketed.bindings[*]" 0
|
||||||
// @is "$.index[*][?(@.name=='lending_next')].inner.function.decl.output.qualified_path.self_type.generic" \"Self\"
|
//@ is "$.index[*][?(@.name=='lending_next')].inner.function.decl.output.qualified_path.self_type.generic" \"Self\"
|
||||||
// @is "$.index[*][?(@.name=='lending_next')].inner.function.decl.output.qualified_path.name" \"LendingItem\"
|
//@ is "$.index[*][?(@.name=='lending_next')].inner.function.decl.output.qualified_path.name" \"LendingItem\"
|
||||||
fn lending_next<'a>(&'a self) -> Self::LendingItem<'a>;
|
fn lending_next<'a>(&'a self) -> Self::LendingItem<'a>;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait Iterator {
|
pub trait Iterator {
|
||||||
// @count "$.index[*][?(@.name=='Item')].inner.assoc_type.generics.params[*]" 0
|
//@ count "$.index[*][?(@.name=='Item')].inner.assoc_type.generics.params[*]" 0
|
||||||
// @count "$.index[*][?(@.name=='Item')].inner.assoc_type.generics.where_predicates[*]" 0
|
//@ count "$.index[*][?(@.name=='Item')].inner.assoc_type.generics.where_predicates[*]" 0
|
||||||
// @count "$.index[*][?(@.name=='Item')].inner.assoc_type.bounds[*]" 1
|
//@ count "$.index[*][?(@.name=='Item')].inner.assoc_type.bounds[*]" 1
|
||||||
type Item: Display;
|
type Item: Display;
|
||||||
|
|
||||||
// @count "$.index[*][?(@.name=='next')].inner.function.decl.output.qualified_path.args.angle_bracketed.args[*]" 0
|
//@ count "$.index[*][?(@.name=='next')].inner.function.decl.output.qualified_path.args.angle_bracketed.args[*]" 0
|
||||||
// @count "$.index[*][?(@.name=='next')].inner.function.decl.output.qualified_path.args.angle_bracketed.bindings[*]" 0
|
//@ count "$.index[*][?(@.name=='next')].inner.function.decl.output.qualified_path.args.angle_bracketed.bindings[*]" 0
|
||||||
// @is "$.index[*][?(@.name=='next')].inner.function.decl.output.qualified_path.self_type.generic" \"Self\"
|
//@ is "$.index[*][?(@.name=='next')].inner.function.decl.output.qualified_path.self_type.generic" \"Self\"
|
||||||
// @is "$.index[*][?(@.name=='next')].inner.function.decl.output.qualified_path.name" \"Item\"
|
//@ is "$.index[*][?(@.name=='next')].inner.function.decl.output.qualified_path.name" \"Item\"
|
||||||
fn next<'a>(&'a self) -> Self::Item;
|
fn next<'a>(&'a self) -> Self::Item;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Regression test for <https://github.com/rust-lang/rust/issues/97986>.
|
// Regression test for <https://github.com/rust-lang/rust/issues/97986>.
|
||||||
|
|
||||||
// @has "$.index[*][?(@.name=='f')]"
|
//@ has "$.index[*][?(@.name=='f')]"
|
||||||
// @has "$.index[*][?(@.name=='AssocTy')]"
|
//@ has "$.index[*][?(@.name=='AssocTy')]"
|
||||||
// @has "$.index[*][?(@.name=='AssocConst')]"
|
//@ has "$.index[*][?(@.name=='AssocConst')]"
|
||||||
|
|
||||||
pub mod m {
|
pub mod m {
|
||||||
pub struct S;
|
pub struct S;
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
||||||
// @has "$.index[*][?(@.name=='glob')]"
|
//@ has "$.index[*][?(@.name=='glob')]"
|
||||||
// @has "$.index[*][?(@.inner.import)].inner.import.name" \"*\"
|
//@ has "$.index[*][?(@.inner.import)].inner.import.name" \"*\"
|
||||||
|
|
||||||
mod m1 {
|
mod m1 {
|
||||||
pub fn f() {}
|
pub fn f() {}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#![feature(precise_capturing)]
|
#![feature(precise_capturing)]
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='hello')].inner.function.decl.output.impl_trait[1].use[0]" \"\'a\"
|
//@ is "$.index[*][?(@.name=='hello')].inner.function.decl.output.impl_trait[1].use[0]" \"\'a\"
|
||||||
// @is "$.index[*][?(@.name=='hello')].inner.function.decl.output.impl_trait[1].use[1]" \"T\"
|
//@ is "$.index[*][?(@.name=='hello')].inner.function.decl.output.impl_trait[1].use[1]" \"T\"
|
||||||
// @is "$.index[*][?(@.name=='hello')].inner.function.decl.output.impl_trait[1].use[2]" \"N\"
|
//@ is "$.index[*][?(@.name=='hello')].inner.function.decl.output.impl_trait[1].use[2]" \"N\"
|
||||||
pub fn hello<'a, T, const N: usize>() -> impl Sized + use<'a, T, N> {}
|
pub fn hello<'a, T, const N: usize>() -> impl Sized + use<'a, T, N> {}
|
||||||
|
|
|
@ -15,8 +15,8 @@ impl Foo {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Testing spans, so all tests below code
|
// Testing spans, so all tests below code
|
||||||
// @is "$.index[*][?(@.docs=='has span')].span.begin" "[13, 0]"
|
//@ is "$.index[*][?(@.docs=='has span')].span.begin" "[13, 0]"
|
||||||
// @is "$.index[*][?(@.docs=='has span')].span.end" "[15, 1]"
|
//@ is "$.index[*][?(@.docs=='has span')].span.end" "[15, 1]"
|
||||||
// FIXME: this doesn't work due to https://github.com/freestrings/jsonpath/issues/91
|
// FIXME: this doesn't work due to https://github.com/freestrings/jsonpath/issues/91
|
||||||
// is "$.index[*][?(@.inner.impl.synthetic==true)].span" null
|
// is "$.index[*][?(@.inner.impl.synthetic==true)].span" null
|
||||||
pub struct Foo;
|
pub struct Foo;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
// Test for the ICE in rust/83718
|
// Test for the ICE in rust/83718
|
||||||
// A blanket impl plus a local type together shouldn't result in mismatched ID issues
|
// A blanket impl plus a local type together shouldn't result in mismatched ID issues
|
||||||
|
|
||||||
// @has "$.index[*][?(@.name=='Load')]"
|
//@ has "$.index[*][?(@.name=='Load')]"
|
||||||
pub trait Load {
|
pub trait Load {
|
||||||
// @has "$.index[*][?(@.name=='load')]"
|
//@ has "$.index[*][?(@.name=='load')]"
|
||||||
fn load() {}
|
fn load() {}
|
||||||
// @has "$.index[*][?(@.name=='write')]"
|
//@ has "$.index[*][?(@.name=='write')]"
|
||||||
fn write(self) {}
|
fn write(self) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,5 +14,5 @@ impl<P> Load for P {
|
||||||
fn write(self) {}
|
fn write(self) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// @has "$.index[*][?(@.name=='Wrapper')]"
|
//@ has "$.index[*][?(@.name=='Wrapper')]"
|
||||||
pub struct Wrapper {}
|
pub struct Wrapper {}
|
||||||
|
|
|
@ -3,16 +3,16 @@ extern crate foreign_trait;
|
||||||
|
|
||||||
/// ForeignTrait id hack
|
/// ForeignTrait id hack
|
||||||
pub use foreign_trait::ForeignTrait as _;
|
pub use foreign_trait::ForeignTrait as _;
|
||||||
// @set ForeignTrait = "$.index[*][?(@.docs=='ForeignTrait id hack')].inner.import.id"
|
//@ set ForeignTrait = "$.index[*][?(@.docs=='ForeignTrait id hack')].inner.import.id"
|
||||||
|
|
||||||
pub struct LocalStruct;
|
pub struct LocalStruct;
|
||||||
// @set LocalStruct = "$.index[*][?(@.name=='LocalStruct')].id"
|
//@ set LocalStruct = "$.index[*][?(@.name=='LocalStruct')].id"
|
||||||
|
|
||||||
/// foreign for local
|
/// foreign for local
|
||||||
impl foreign_trait::ForeignTrait for LocalStruct {}
|
impl foreign_trait::ForeignTrait for LocalStruct {}
|
||||||
|
|
||||||
// @set impl = "$.index[*][?(@.docs=='foreign for local')].id"
|
//@ set impl = "$.index[*][?(@.docs=='foreign for local')].id"
|
||||||
// @is "$.index[*][?(@.docs=='foreign for local')].inner.impl.for.resolved_path.id" $LocalStruct
|
//@ is "$.index[*][?(@.docs=='foreign for local')].inner.impl.for.resolved_path.id" $LocalStruct
|
||||||
// @is "$.index[*][?(@.docs=='foreign for local')].inner.impl.trait.id" $ForeignTrait
|
//@ is "$.index[*][?(@.docs=='foreign for local')].inner.impl.trait.id" $ForeignTrait
|
||||||
|
|
||||||
// @has "$.index[*][?(@.name=='LocalStruct')].inner.struct.impls[*]" $impl
|
//@ has "$.index[*][?(@.name=='LocalStruct')].inner.struct.impls[*]" $impl
|
||||||
|
|
|
@ -4,13 +4,13 @@ pub struct Foo;
|
||||||
impl Foo {
|
impl Foo {
|
||||||
fn baz() {}
|
fn baz() {}
|
||||||
}
|
}
|
||||||
// @!has '$.index[*][?(@.docs=="impl Foo priv")]'
|
//@ !has '$.index[*][?(@.docs=="impl Foo priv")]'
|
||||||
|
|
||||||
/// impl Foo pub
|
/// impl Foo pub
|
||||||
impl Foo {
|
impl Foo {
|
||||||
pub fn qux() {}
|
pub fn qux() {}
|
||||||
}
|
}
|
||||||
// @is '$.index[*][?(@.docs=="impl Foo pub")].visibility' '"default"'
|
//@ is '$.index[*][?(@.docs=="impl Foo pub")].visibility' '"default"'
|
||||||
|
|
||||||
/// impl Foo hidden
|
/// impl Foo hidden
|
||||||
impl Foo {
|
impl Foo {
|
||||||
|
@ -18,4 +18,4 @@ impl Foo {
|
||||||
pub fn __quazl() {}
|
pub fn __quazl() {}
|
||||||
}
|
}
|
||||||
// FIXME(#111564): Is this the right behaviour?
|
// FIXME(#111564): Is this the right behaviour?
|
||||||
// @is '$.index[*][?(@.docs=="impl Foo hidden")].visibility' '"default"'
|
//@ is '$.index[*][?(@.docs=="impl Foo hidden")].visibility' '"default"'
|
||||||
|
|
|
@ -7,13 +7,13 @@ impl Foo {
|
||||||
fn baz() {}
|
fn baz() {}
|
||||||
}
|
}
|
||||||
// FIXME(#111564): Is this the right behaviour?
|
// FIXME(#111564): Is this the right behaviour?
|
||||||
// @is '$.index[*][?(@.docs=="impl Foo priv")].visibility' '"default"'
|
//@ is '$.index[*][?(@.docs=="impl Foo priv")].visibility' '"default"'
|
||||||
|
|
||||||
/// impl Foo pub
|
/// impl Foo pub
|
||||||
impl Foo {
|
impl Foo {
|
||||||
pub fn qux() {}
|
pub fn qux() {}
|
||||||
}
|
}
|
||||||
// @is '$.index[*][?(@.docs=="impl Foo pub")].visibility' '"default"'
|
//@ is '$.index[*][?(@.docs=="impl Foo pub")].visibility' '"default"'
|
||||||
|
|
||||||
/// impl Foo hidden
|
/// impl Foo hidden
|
||||||
impl Foo {
|
impl Foo {
|
||||||
|
@ -21,4 +21,4 @@ impl Foo {
|
||||||
pub fn __quazl() {}
|
pub fn __quazl() {}
|
||||||
}
|
}
|
||||||
// FIXME(#111564): Is this the right behaviour?
|
// FIXME(#111564): Is this the right behaviour?
|
||||||
// @is '$.index[*][?(@.docs=="impl Foo hidden")].visibility' '"default"'
|
//@ is '$.index[*][?(@.docs=="impl Foo hidden")].visibility' '"default"'
|
||||||
|
|
|
@ -6,13 +6,13 @@ pub struct Foo;
|
||||||
impl Foo {
|
impl Foo {
|
||||||
fn baz() {}
|
fn baz() {}
|
||||||
}
|
}
|
||||||
// @is '$.index[*][?(@.docs=="impl Foo priv")].visibility' '"default"'
|
//@ is '$.index[*][?(@.docs=="impl Foo priv")].visibility' '"default"'
|
||||||
|
|
||||||
/// impl Foo pub
|
/// impl Foo pub
|
||||||
impl Foo {
|
impl Foo {
|
||||||
pub fn qux() {}
|
pub fn qux() {}
|
||||||
}
|
}
|
||||||
// @is '$.index[*][?(@.docs=="impl Foo pub")].visibility' '"default"'
|
//@ is '$.index[*][?(@.docs=="impl Foo pub")].visibility' '"default"'
|
||||||
|
|
||||||
/// impl Foo hidden
|
/// impl Foo hidden
|
||||||
impl Foo {
|
impl Foo {
|
||||||
|
@ -20,4 +20,4 @@ impl Foo {
|
||||||
pub fn __quazl() {}
|
pub fn __quazl() {}
|
||||||
}
|
}
|
||||||
// FIXME(#111564): Is this the right behaviour?
|
// FIXME(#111564): Is this the right behaviour?
|
||||||
// @is '$.index[*][?(@.docs=="impl Foo hidden")].visibility' '"default"'
|
//@ is '$.index[*][?(@.docs=="impl Foo hidden")].visibility' '"default"'
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
// https://github.com/rust-lang/rust/issues/100252
|
// https://github.com/rust-lang/rust/issues/100252
|
||||||
|
|
||||||
mod bar {
|
mod bar {
|
||||||
// @set baz = "$.index[*][?(@.name == 'Baz')].id"
|
//@ set baz = "$.index[*][?(@.name == 'Baz')].id"
|
||||||
pub struct Baz;
|
pub struct Baz;
|
||||||
// @set impl = "$.index[*][?(@.docs == 'impl')].id"
|
//@ set impl = "$.index[*][?(@.docs == 'impl')].id"
|
||||||
/// impl
|
/// impl
|
||||||
impl Baz {
|
impl Baz {
|
||||||
// @set doit = "$.index[*][?(@.name == 'doit')].id"
|
//@ set doit = "$.index[*][?(@.name == 'doit')].id"
|
||||||
pub fn doit() {}
|
pub fn doit() {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// @set import = "$.index[*][?(@.inner.import)].id"
|
//@ set import = "$.index[*][?(@.inner.import)].id"
|
||||||
pub use bar::Baz;
|
pub use bar::Baz;
|
||||||
|
|
||||||
// @is "$.index[*].inner.module.items[*]" $import
|
//@ is "$.index[*].inner.module.items[*]" $import
|
||||||
// @is "$.index[*].inner.import.id" $baz
|
//@ is "$.index[*].inner.import.id" $baz
|
||||||
// @has "$.index[*][?(@.name == 'Baz')].inner.struct.impls[*]" $impl
|
//@ has "$.index[*][?(@.name == 'Baz')].inner.struct.impls[*]" $impl
|
||||||
// @is "$.index[*][?(@.docs=='impl')].inner.impl.items[*]" $doit
|
//@ is "$.index[*][?(@.docs=='impl')].inner.impl.items[*]" $doit
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// @has "$.index[*][?(@.docs=='Here')]"
|
//@ has "$.index[*][?(@.docs=='Here')]"
|
||||||
// @!has "$.index[*][?(@.docs=='Not Here')]"
|
//@ !has "$.index[*][?(@.docs=='Not Here')]"
|
||||||
// @!has "$.index[*][?(@.name == 'HiddenPubStruct')]"
|
//@ !has "$.index[*][?(@.name == 'HiddenPubStruct')]"
|
||||||
// @has "$.index[*][?(@.name == 'NotHiddenPubStruct')]"
|
//@ has "$.index[*][?(@.name == 'NotHiddenPubStruct')]"
|
||||||
// @has "$.index[*][?(@.name=='PubTrait')]"
|
//@ has "$.index[*][?(@.name=='PubTrait')]"
|
||||||
pub trait PubTrait {}
|
pub trait PubTrait {}
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//@ compile-flags: --document-hidden-items
|
//@ compile-flags: --document-hidden-items
|
||||||
|
|
||||||
// @has "$.index[*][?(@.name == 'HiddenPubStruct')]"
|
//@ has "$.index[*][?(@.name == 'HiddenPubStruct')]"
|
||||||
// @has "$.index[*][?(@.inner.impl)]"
|
//@ has "$.index[*][?(@.inner.impl)]"
|
||||||
// @has "$.index[*][?(@.name=='PubTrait')]"
|
//@ has "$.index[*][?(@.name=='PubTrait')]"
|
||||||
pub trait PubTrait {}
|
pub trait PubTrait {}
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
// @has "$.index[*][?(@.name=='PubTrait')]"
|
//@ has "$.index[*][?(@.name=='PubTrait')]"
|
||||||
pub trait PubTrait {}
|
pub trait PubTrait {}
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub mod hidden {
|
pub mod hidden {
|
||||||
// @!has "$.index[*][?(@.name == 'HiddenPubStruct')]"
|
//@ !has "$.index[*][?(@.name == 'HiddenPubStruct')]"
|
||||||
pub struct HiddenPubStruct;
|
pub struct HiddenPubStruct;
|
||||||
|
|
||||||
// @!has "$.index[*][?(@.docs == 'Not Here')]"
|
//@ !has "$.index[*][?(@.docs == 'Not Here')]"
|
||||||
/// Not Here
|
/// Not Here
|
||||||
impl crate::PubTrait for HiddenPubStruct {}
|
impl crate::PubTrait for HiddenPubStruct {}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub mod not_hidden {
|
pub mod not_hidden {
|
||||||
// @has "$.index[*][?(@.name == 'NotHiddenPubStruct')]"
|
//@ has "$.index[*][?(@.name == 'NotHiddenPubStruct')]"
|
||||||
pub struct NotHiddenPubStruct;
|
pub struct NotHiddenPubStruct;
|
||||||
|
|
||||||
// @has "$.index[*][?(@.docs == 'Here')]"
|
//@ has "$.index[*][?(@.docs == 'Here')]"
|
||||||
/// Here
|
/// Here
|
||||||
impl crate::PubTrait for NotHiddenPubStruct {}
|
impl crate::PubTrait for NotHiddenPubStruct {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,16 +3,16 @@ extern crate foreign_struct;
|
||||||
|
|
||||||
/// ForeignStruct id hack
|
/// ForeignStruct id hack
|
||||||
pub use foreign_struct::ForeignStruct as _;
|
pub use foreign_struct::ForeignStruct as _;
|
||||||
// @set ForeignStruct = "$.index[*][?(@.docs=='ForeignStruct id hack')].inner.import.id"
|
//@ set ForeignStruct = "$.index[*][?(@.docs=='ForeignStruct id hack')].inner.import.id"
|
||||||
|
|
||||||
pub trait LocalTrait {}
|
pub trait LocalTrait {}
|
||||||
// @set LocalTrait = "$.index[*][?(@.name=='LocalTrait')].id"
|
//@ set LocalTrait = "$.index[*][?(@.name=='LocalTrait')].id"
|
||||||
|
|
||||||
/// local for foreign
|
/// local for foreign
|
||||||
impl LocalTrait for foreign_struct::ForeignStruct {}
|
impl LocalTrait for foreign_struct::ForeignStruct {}
|
||||||
|
|
||||||
// @set impl = "$.index[*][?(@.docs=='local for foreign')].id"
|
//@ set impl = "$.index[*][?(@.docs=='local for foreign')].id"
|
||||||
// @is "$.index[*][?(@.docs=='local for foreign')].inner.impl.trait.id" $LocalTrait
|
//@ is "$.index[*][?(@.docs=='local for foreign')].inner.impl.trait.id" $LocalTrait
|
||||||
// @is "$.index[*][?(@.docs=='local for foreign')].inner.impl.for.resolved_path.id" $ForeignStruct
|
//@ is "$.index[*][?(@.docs=='local for foreign')].inner.impl.for.resolved_path.id" $ForeignStruct
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='LocalTrait')].inner.trait.implementations[*]" $impl
|
//@ is "$.index[*][?(@.name=='LocalTrait')].inner.trait.implementations[*]" $impl
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
// @set struct = "$.index[*][?(@.name=='Struct')].id"
|
//@ set struct = "$.index[*][?(@.name=='Struct')].id"
|
||||||
pub struct Struct;
|
pub struct Struct;
|
||||||
// @set trait = "$.index[*][?(@.name=='Trait')].id"
|
//@ set trait = "$.index[*][?(@.name=='Trait')].id"
|
||||||
pub trait Trait {}
|
pub trait Trait {}
|
||||||
// @set impl = "$.index[*][?(@.docs=='impl')].id"
|
//@ set impl = "$.index[*][?(@.docs=='impl')].id"
|
||||||
/// impl
|
/// impl
|
||||||
impl Trait for Struct {}
|
impl Trait for Struct {}
|
||||||
|
|
||||||
// @has "$.index[*][?(@.name=='Struct')].inner.struct.impls[*]" $impl
|
//@ has "$.index[*][?(@.name=='Struct')].inner.struct.impls[*]" $impl
|
||||||
// @is "$.index[*][?(@.name=='Trait')].inner.trait.implementations[*]" $impl
|
//@ is "$.index[*][?(@.name=='Trait')].inner.trait.implementations[*]" $impl
|
||||||
// @is "$.index[*][?(@.docs=='impl')].inner.impl.trait.id" $trait
|
//@ is "$.index[*][?(@.docs=='impl')].inner.impl.trait.id" $trait
|
||||||
// @is "$.index[*][?(@.docs=='impl')].inner.impl.for.resolved_path.id" $struct
|
//@ is "$.index[*][?(@.docs=='impl')].inner.impl.for.resolved_path.id" $struct
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
#![feature(rustc_attrs)]
|
#![feature(rustc_attrs)]
|
||||||
|
|
||||||
// @set Local = "$.index[*][?(@.name=='Local')].id"
|
//@ set Local = "$.index[*][?(@.name=='Local')].id"
|
||||||
pub trait Local {}
|
pub trait Local {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.docs=='Local for bool')].inner.impl.trait.id" $Local
|
//@ is "$.index[*][?(@.docs=='Local for bool')].inner.impl.trait.id" $Local
|
||||||
// @is "$.index[*][?(@.docs=='Local for bool')].inner.impl.for.primitive" '"bool"'
|
//@ is "$.index[*][?(@.docs=='Local for bool')].inner.impl.for.primitive" '"bool"'
|
||||||
/// Local for bool
|
/// Local for bool
|
||||||
impl Local for bool {}
|
impl Local for bool {}
|
||||||
|
|
||||||
// @set impl = "$.index[*][?(@.docs=='Local for bool')].id"
|
//@ set impl = "$.index[*][?(@.docs=='Local for bool')].id"
|
||||||
// @is "$.index[*][?(@.name=='Local')].inner.trait.implementations[*]" $impl
|
//@ is "$.index[*][?(@.name=='Local')].inner.trait.implementations[*]" $impl
|
||||||
|
|
||||||
// FIXME(#101695): Test bool's `impls` include "Local for bool"
|
// FIXME(#101695): Test bool's `impls` include "Local for bool"
|
||||||
// @has "$.index[*][?(@.name=='bool')]"
|
//@ has "$.index[*][?(@.name=='bool')]"
|
||||||
#[rustc_doc_primitive = "bool"]
|
#[rustc_doc_primitive = "bool"]
|
||||||
/// Boolean docs
|
/// Boolean docs
|
||||||
mod prim_bool {}
|
mod prim_bool {}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// @set local = "$.index[*][?(@.name=='Local')]"
|
//@ set local = "$.index[*][?(@.name=='Local')]"
|
||||||
pub trait Local {}
|
pub trait Local {}
|
||||||
|
|
||||||
// @set impl = "$.index[*][?(@.docs=='local for bool')].id"
|
//@ set impl = "$.index[*][?(@.docs=='local for bool')].id"
|
||||||
// @is "$.index[*][?(@.name=='Local')].inner.trait.implementations[*]" $impl
|
//@ is "$.index[*][?(@.name=='Local')].inner.trait.implementations[*]" $impl
|
||||||
/// local for bool
|
/// local for bool
|
||||||
impl Local for bool {}
|
impl Local for bool {}
|
||||||
|
|
|
@ -8,6 +8,6 @@ pub struct Local;
|
||||||
/// local impl
|
/// local impl
|
||||||
impl enum_variant_in_trait_method::Trait for Local {}
|
impl enum_variant_in_trait_method::Trait for Local {}
|
||||||
|
|
||||||
// @!has "$.index[*][?(@.name == 'Trait')]"
|
//@ !has "$.index[*][?(@.name == 'Trait')]"
|
||||||
// @!has "$.index[*][?(@.name == 'method')]"
|
//@ !has "$.index[*][?(@.name == 'method')]"
|
||||||
// @count "$.index[*][?(@.docs == 'local impl')].inner.items[*]" 0
|
//@ count "$.index[*][?(@.docs == 'local impl')].inner.items[*]" 0
|
||||||
|
|
|
@ -7,17 +7,17 @@
|
||||||
//! [`Trait::ASSOC_CONST`]
|
//! [`Trait::ASSOC_CONST`]
|
||||||
//! [`Trait::method`]
|
//! [`Trait::method`]
|
||||||
|
|
||||||
// @set struct_field = "$.index[*][?(@.name=='struct_field')].id"
|
//@ set struct_field = "$.index[*][?(@.name=='struct_field')].id"
|
||||||
// @set Variant = "$.index[*][?(@.name=='Variant')].id"
|
//@ set Variant = "$.index[*][?(@.name=='Variant')].id"
|
||||||
// @set AssocType = "$.index[*][?(@.name=='AssocType')].id"
|
//@ set AssocType = "$.index[*][?(@.name=='AssocType')].id"
|
||||||
// @set ASSOC_CONST = "$.index[*][?(@.name=='ASSOC_CONST')].id"
|
//@ set ASSOC_CONST = "$.index[*][?(@.name=='ASSOC_CONST')].id"
|
||||||
// @set method = "$.index[*][?(@.name=='method')].id"
|
//@ set method = "$.index[*][?(@.name=='method')].id"
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='non_page')].links['`Struct::struct_field`']" $struct_field
|
//@ is "$.index[*][?(@.name=='non_page')].links['`Struct::struct_field`']" $struct_field
|
||||||
// @is "$.index[*][?(@.name=='non_page')].links['`Enum::Variant`']" $Variant
|
//@ is "$.index[*][?(@.name=='non_page')].links['`Enum::Variant`']" $Variant
|
||||||
// @is "$.index[*][?(@.name=='non_page')].links['`Trait::AssocType`']" $AssocType
|
//@ is "$.index[*][?(@.name=='non_page')].links['`Trait::AssocType`']" $AssocType
|
||||||
// @is "$.index[*][?(@.name=='non_page')].links['`Trait::ASSOC_CONST`']" $ASSOC_CONST
|
//@ is "$.index[*][?(@.name=='non_page')].links['`Trait::ASSOC_CONST`']" $ASSOC_CONST
|
||||||
// @is "$.index[*][?(@.name=='non_page')].links['`Trait::method`']" $method
|
//@ is "$.index[*][?(@.name=='non_page')].links['`Trait::method`']" $method
|
||||||
|
|
||||||
pub struct Struct {
|
pub struct Struct {
|
||||||
pub struct_field: i32,
|
pub struct_field: i32,
|
||||||
|
|
|
@ -4,5 +4,5 @@
|
||||||
/// To test rustdoc json
|
/// To test rustdoc json
|
||||||
pub fn foo() {}
|
pub fn foo() {}
|
||||||
|
|
||||||
// @set foo = "$.index[*][?(@.name=='foo')].id"
|
//@ set foo = "$.index[*][?(@.name=='foo')].id"
|
||||||
// @is "$.index[*][?(@.name=='user_written')].links['foo#reasons']" $foo
|
//@ is "$.index[*][?(@.name=='user_written')].links['foo#reasons']" $foo
|
||||||
|
|
|
@ -6,15 +6,15 @@
|
||||||
#![feature(rustdoc_internals)]
|
#![feature(rustdoc_internals)]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
||||||
// @!has "$.index[*][?(@.name=='match')]"
|
//@ !has "$.index[*][?(@.name=='match')]"
|
||||||
// @has "$.index[*][?(@.name=='foo')]"
|
//@ has "$.index[*][?(@.name=='foo')]"
|
||||||
|
|
||||||
#[doc(keyword = "match")]
|
#[doc(keyword = "match")]
|
||||||
/// this is a test!
|
/// this is a test!
|
||||||
pub mod foo {}
|
pub mod foo {}
|
||||||
|
|
||||||
// @!has "$.index[*][?(@.name=='hello')]"
|
//@ !has "$.index[*][?(@.name=='hello')]"
|
||||||
// @!has "$.index[*][?(@.name=='bar')]"
|
//@ !has "$.index[*][?(@.name=='bar')]"
|
||||||
#[doc(keyword = "hello")]
|
#[doc(keyword = "hello")]
|
||||||
/// hello
|
/// hello
|
||||||
mod bar {}
|
mod bar {}
|
||||||
|
|
|
@ -3,18 +3,18 @@
|
||||||
//@ compile-flags: --document-private-items
|
//@ compile-flags: --document-private-items
|
||||||
#![feature(rustdoc_internals)]
|
#![feature(rustdoc_internals)]
|
||||||
|
|
||||||
// @!has "$.index[*][?(@.name=='match')]"
|
//@ !has "$.index[*][?(@.name=='match')]"
|
||||||
// @has "$.index[*][?(@.name=='foo')]"
|
//@ has "$.index[*][?(@.name=='foo')]"
|
||||||
// @is "$.index[*][?(@.name=='foo')].attrs" '["#[doc(keyword = \"match\")]"]'
|
//@ is "$.index[*][?(@.name=='foo')].attrs" '["#[doc(keyword = \"match\")]"]'
|
||||||
// @is "$.index[*][?(@.name=='foo')].docs" '"this is a test!"'
|
//@ is "$.index[*][?(@.name=='foo')].docs" '"this is a test!"'
|
||||||
#[doc(keyword = "match")]
|
#[doc(keyword = "match")]
|
||||||
/// this is a test!
|
/// this is a test!
|
||||||
pub mod foo {}
|
pub mod foo {}
|
||||||
|
|
||||||
// @!has "$.index[*][?(@.name=='hello')]"
|
//@ !has "$.index[*][?(@.name=='hello')]"
|
||||||
// @has "$.index[*][?(@.name=='bar')]"
|
//@ has "$.index[*][?(@.name=='bar')]"
|
||||||
// @is "$.index[*][?(@.name=='bar')].attrs" '["#[doc(keyword = \"hello\")]"]'
|
//@ is "$.index[*][?(@.name=='bar')].attrs" '["#[doc(keyword = \"hello\")]"]'
|
||||||
// @is "$.index[*][?(@.name=='bar')].docs" '"hello"'
|
//@ is "$.index[*][?(@.name=='bar')].docs" '"hello"'
|
||||||
#[doc(keyword = "hello")]
|
#[doc(keyword = "hello")]
|
||||||
/// hello
|
/// hello
|
||||||
mod bar {}
|
mod bar {}
|
||||||
|
|
|
@ -1,26 +1,26 @@
|
||||||
// ignore-tidy-linelength
|
// ignore-tidy-linelength
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='longest')].inner.function.generics.params[0].name" \"\'a\"
|
//@ is "$.index[*][?(@.name=='longest')].inner.function.generics.params[0].name" \"\'a\"
|
||||||
// @is "$.index[*][?(@.name=='longest')].inner.function.generics.params[0].kind" '{"lifetime": {"outlives": []}}'
|
//@ is "$.index[*][?(@.name=='longest')].inner.function.generics.params[0].kind" '{"lifetime": {"outlives": []}}'
|
||||||
// @is "$.index[*][?(@.name=='longest')].inner.function.generics.params[0].kind" '{"lifetime": {"outlives": []}}'
|
//@ is "$.index[*][?(@.name=='longest')].inner.function.generics.params[0].kind" '{"lifetime": {"outlives": []}}'
|
||||||
// @count "$.index[*][?(@.name=='longest')].inner.function.generics.params[*]" 1
|
//@ count "$.index[*][?(@.name=='longest')].inner.function.generics.params[*]" 1
|
||||||
// @is "$.index[*][?(@.name=='longest')].inner.function.generics.where_predicates" []
|
//@ is "$.index[*][?(@.name=='longest')].inner.function.generics.where_predicates" []
|
||||||
|
|
||||||
// @count "$.index[*][?(@.name=='longest')].inner.function.decl.inputs[*]" 2
|
//@ count "$.index[*][?(@.name=='longest')].inner.function.decl.inputs[*]" 2
|
||||||
// @is "$.index[*][?(@.name=='longest')].inner.function.decl.inputs[0][0]" '"l"'
|
//@ is "$.index[*][?(@.name=='longest')].inner.function.decl.inputs[0][0]" '"l"'
|
||||||
// @is "$.index[*][?(@.name=='longest')].inner.function.decl.inputs[1][0]" '"r"'
|
//@ is "$.index[*][?(@.name=='longest')].inner.function.decl.inputs[1][0]" '"r"'
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='longest')].inner.function.decl.inputs[0][1].borrowed_ref.lifetime" \"\'a\"
|
//@ is "$.index[*][?(@.name=='longest')].inner.function.decl.inputs[0][1].borrowed_ref.lifetime" \"\'a\"
|
||||||
// @is "$.index[*][?(@.name=='longest')].inner.function.decl.inputs[0][1].borrowed_ref.mutable" false
|
//@ is "$.index[*][?(@.name=='longest')].inner.function.decl.inputs[0][1].borrowed_ref.mutable" false
|
||||||
// @is "$.index[*][?(@.name=='longest')].inner.function.decl.inputs[0][1].borrowed_ref.type.primitive" \"str\"
|
//@ is "$.index[*][?(@.name=='longest')].inner.function.decl.inputs[0][1].borrowed_ref.type.primitive" \"str\"
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='longest')].inner.function.decl.inputs[1][1].borrowed_ref.lifetime" \"\'a\"
|
//@ is "$.index[*][?(@.name=='longest')].inner.function.decl.inputs[1][1].borrowed_ref.lifetime" \"\'a\"
|
||||||
// @is "$.index[*][?(@.name=='longest')].inner.function.decl.inputs[1][1].borrowed_ref.mutable" false
|
//@ is "$.index[*][?(@.name=='longest')].inner.function.decl.inputs[1][1].borrowed_ref.mutable" false
|
||||||
// @is "$.index[*][?(@.name=='longest')].inner.function.decl.inputs[1][1].borrowed_ref.type.primitive" \"str\"
|
//@ is "$.index[*][?(@.name=='longest')].inner.function.decl.inputs[1][1].borrowed_ref.type.primitive" \"str\"
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='longest')].inner.function.decl.output.borrowed_ref.lifetime" \"\'a\"
|
//@ is "$.index[*][?(@.name=='longest')].inner.function.decl.output.borrowed_ref.lifetime" \"\'a\"
|
||||||
// @is "$.index[*][?(@.name=='longest')].inner.function.decl.output.borrowed_ref.mutable" false
|
//@ is "$.index[*][?(@.name=='longest')].inner.function.decl.output.borrowed_ref.mutable" false
|
||||||
// @is "$.index[*][?(@.name=='longest')].inner.function.decl.output.borrowed_ref.type.primitive" \"str\"
|
//@ is "$.index[*][?(@.name=='longest')].inner.function.decl.output.borrowed_ref.type.primitive" \"str\"
|
||||||
|
|
||||||
pub fn longest<'a>(l: &'a str, r: &'a str) -> &'a str {
|
pub fn longest<'a>(l: &'a str, r: &'a str) -> &'a str {
|
||||||
if l.len() > r.len() { l } else { r }
|
if l.len() > r.len() { l } else { r }
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
// ignore-tidy-linelength
|
// ignore-tidy-linelength
|
||||||
|
|
||||||
// @count "$.index[*][?(@.name=='foo')].inner.function.generics.params[*]" 3
|
//@ count "$.index[*][?(@.name=='foo')].inner.function.generics.params[*]" 3
|
||||||
// @is "$.index[*][?(@.name=='foo')].inner.function.generics.where_predicates" []
|
//@ is "$.index[*][?(@.name=='foo')].inner.function.generics.where_predicates" []
|
||||||
// @is "$.index[*][?(@.name=='foo')].inner.function.generics.params[0].name" \"\'a\"
|
//@ is "$.index[*][?(@.name=='foo')].inner.function.generics.params[0].name" \"\'a\"
|
||||||
// @is "$.index[*][?(@.name=='foo')].inner.function.generics.params[1].name" \"\'b\"
|
//@ is "$.index[*][?(@.name=='foo')].inner.function.generics.params[1].name" \"\'b\"
|
||||||
// @is "$.index[*][?(@.name=='foo')].inner.function.generics.params[2].name" '"T"'
|
//@ is "$.index[*][?(@.name=='foo')].inner.function.generics.params[2].name" '"T"'
|
||||||
// @is "$.index[*][?(@.name=='foo')].inner.function.generics.params[0].kind.lifetime.outlives" []
|
//@ is "$.index[*][?(@.name=='foo')].inner.function.generics.params[0].kind.lifetime.outlives" []
|
||||||
// @is "$.index[*][?(@.name=='foo')].inner.function.generics.params[1].kind.lifetime.outlives" [\"\'a\"]
|
//@ is "$.index[*][?(@.name=='foo')].inner.function.generics.params[1].kind.lifetime.outlives" [\"\'a\"]
|
||||||
// @is "$.index[*][?(@.name=='foo')].inner.function.generics.params[2].kind.type.default" null
|
//@ is "$.index[*][?(@.name=='foo')].inner.function.generics.params[2].kind.type.default" null
|
||||||
// @count "$.index[*][?(@.name=='foo')].inner.function.generics.params[2].kind.type.bounds[*]" 1
|
//@ count "$.index[*][?(@.name=='foo')].inner.function.generics.params[2].kind.type.bounds[*]" 1
|
||||||
// @is "$.index[*][?(@.name=='foo')].inner.function.generics.params[2].kind.type.bounds[0].outlives" \"\'b\"
|
//@ is "$.index[*][?(@.name=='foo')].inner.function.generics.params[2].kind.type.bounds[0].outlives" \"\'b\"
|
||||||
// @is "$.index[*][?(@.name=='foo')].inner.function.decl.inputs[0][1].borrowed_ref.lifetime" \"\'a\"
|
//@ is "$.index[*][?(@.name=='foo')].inner.function.decl.inputs[0][1].borrowed_ref.lifetime" \"\'a\"
|
||||||
// @is "$.index[*][?(@.name=='foo')].inner.function.decl.inputs[0][1].borrowed_ref.mutable" false
|
//@ is "$.index[*][?(@.name=='foo')].inner.function.decl.inputs[0][1].borrowed_ref.mutable" false
|
||||||
// @is "$.index[*][?(@.name=='foo')].inner.function.decl.inputs[0][1].borrowed_ref.type.borrowed_ref.lifetime" \"\'b\"
|
//@ is "$.index[*][?(@.name=='foo')].inner.function.decl.inputs[0][1].borrowed_ref.type.borrowed_ref.lifetime" \"\'b\"
|
||||||
// @is "$.index[*][?(@.name=='foo')].inner.function.decl.inputs[0][1].borrowed_ref.type.borrowed_ref.mutable" false
|
//@ is "$.index[*][?(@.name=='foo')].inner.function.decl.inputs[0][1].borrowed_ref.type.borrowed_ref.mutable" false
|
||||||
// @is "$.index[*][?(@.name=='foo')].inner.function.decl.inputs[0][1].borrowed_ref.type.borrowed_ref.type.generic" \"T\"
|
//@ is "$.index[*][?(@.name=='foo')].inner.function.decl.inputs[0][1].borrowed_ref.type.borrowed_ref.type.generic" \"T\"
|
||||||
pub fn foo<'a, 'b: 'a, T: 'b>(_: &'a &'b T) {}
|
pub fn foo<'a, 'b: 'a, T: 'b>(_: &'a &'b T) {}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// ignore-tidy-linelength
|
// ignore-tidy-linelength
|
||||||
|
|
||||||
// @count '$.index[*][?(@.name=="outlives")].inner.function.generics.params[*]' 2
|
//@ count '$.index[*][?(@.name=="outlives")].inner.function.generics.params[*]' 2
|
||||||
// @is '$.index[*][?(@.name=="outlives")].inner.function.generics.params[0].name' \"\'a\"
|
//@ is '$.index[*][?(@.name=="outlives")].inner.function.generics.params[0].name' \"\'a\"
|
||||||
// @is '$.index[*][?(@.name=="outlives")].inner.function.generics.params[0].kind.lifetime.outlives' []
|
//@ is '$.index[*][?(@.name=="outlives")].inner.function.generics.params[0].kind.lifetime.outlives' []
|
||||||
// @is '$.index[*][?(@.name=="outlives")].inner.function.generics.params[1].name' '"T"'
|
//@ is '$.index[*][?(@.name=="outlives")].inner.function.generics.params[1].name' '"T"'
|
||||||
// @is '$.index[*][?(@.name=="outlives")].inner.function.generics.params[1].kind.type.bounds' '[{"outlives": "'\''a"}]'
|
//@ is '$.index[*][?(@.name=="outlives")].inner.function.generics.params[1].kind.type.bounds' '[{"outlives": "'\''a"}]'
|
||||||
pub fn outlives<'a, T: 'a>() {}
|
pub fn outlives<'a, T: 'a>() {}
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
// ignore-tidy-linelength
|
// ignore-tidy-linelength
|
||||||
|
|
||||||
// @is '$.index[*][?(@.name=="on_lifetimes")].inner.function.generics.where_predicates' '[{"lifetime_predicate": {"lifetime": "'\''all", "outlives": ["'\''a", "'\''b", "'\''c"]}}]'
|
//@ is '$.index[*][?(@.name=="on_lifetimes")].inner.function.generics.where_predicates' '[{"lifetime_predicate": {"lifetime": "'\''all", "outlives": ["'\''a", "'\''b", "'\''c"]}}]'
|
||||||
pub fn on_lifetimes<'a, 'b, 'c, 'all>()
|
pub fn on_lifetimes<'a, 'b, 'c, 'all>()
|
||||||
where
|
where
|
||||||
'all: 'a + 'b + 'c,
|
'all: 'a + 'b + 'c,
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// @count '$.index[*][?(@.name=="on_trait")].inner.function.generics.params[*]' 2
|
//@ count '$.index[*][?(@.name=="on_trait")].inner.function.generics.params[*]' 2
|
||||||
// @is '$.index[*][?(@.name=="on_trait")].inner.function.generics.params[0].name' \"\'a\"
|
//@ is '$.index[*][?(@.name=="on_trait")].inner.function.generics.params[0].name' \"\'a\"
|
||||||
// @is '$.index[*][?(@.name=="on_trait")].inner.function.generics.params[0].kind.lifetime.outlives' []
|
//@ is '$.index[*][?(@.name=="on_trait")].inner.function.generics.params[0].kind.lifetime.outlives' []
|
||||||
// @is '$.index[*][?(@.name=="on_trait")].inner.function.generics.params[1].name' '"T"'
|
//@ is '$.index[*][?(@.name=="on_trait")].inner.function.generics.params[1].name' '"T"'
|
||||||
// @is '$.index[*][?(@.name=="on_trait")].inner.function.generics.params[1].kind.type.bounds' []
|
//@ is '$.index[*][?(@.name=="on_trait")].inner.function.generics.params[1].kind.type.bounds' []
|
||||||
// @is '$.index[*][?(@.name=="on_trait")].inner.function.generics.params[1].kind.type.bounds' []
|
//@ is '$.index[*][?(@.name=="on_trait")].inner.function.generics.params[1].kind.type.bounds' []
|
||||||
// @count '$.index[*][?(@.name=="on_trait")].inner.function.generics.where_predicates[*]' 1
|
//@ count '$.index[*][?(@.name=="on_trait")].inner.function.generics.where_predicates[*]' 1
|
||||||
// @is '$.index[*][?(@.name=="on_trait")].inner.function.generics.where_predicates[0].bound_predicate.type.generic' '"T"'
|
//@ is '$.index[*][?(@.name=="on_trait")].inner.function.generics.where_predicates[0].bound_predicate.type.generic' '"T"'
|
||||||
// @count '$.index[*][?(@.name=="on_trait")].inner.function.generics.where_predicates[0].bound_predicate.bounds[*]' 1
|
//@ count '$.index[*][?(@.name=="on_trait")].inner.function.generics.where_predicates[0].bound_predicate.bounds[*]' 1
|
||||||
// @is '$.index[*][?(@.name=="on_trait")].inner.function.generics.where_predicates[0].bound_predicate.bounds[0].outlives' \"\'a\"
|
//@ is '$.index[*][?(@.name=="on_trait")].inner.function.generics.where_predicates[0].bound_predicate.bounds[0].outlives' \"\'a\"
|
||||||
pub fn on_trait<'a, T>()
|
pub fn on_trait<'a, T>()
|
||||||
where
|
where
|
||||||
T: 'a,
|
T: 'a,
|
||||||
|
|
|
@ -2,51 +2,51 @@
|
||||||
|
|
||||||
#![feature(abi_vectorcall)]
|
#![feature(abi_vectorcall)]
|
||||||
|
|
||||||
// @has "$.index[*][?(@.name=='Foo')]"
|
//@ has "$.index[*][?(@.name=='Foo')]"
|
||||||
pub struct Foo;
|
pub struct Foo;
|
||||||
|
|
||||||
impl Foo {
|
impl Foo {
|
||||||
// @is "$.index[*][?(@.name=='abi_rust')].inner.function.header.abi" \"Rust\"
|
//@ is "$.index[*][?(@.name=='abi_rust')].inner.function.header.abi" \"Rust\"
|
||||||
pub fn abi_rust() {}
|
pub fn abi_rust() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='abi_c')].inner.function.header.abi" '{"C": {"unwind": false}}'
|
//@ is "$.index[*][?(@.name=='abi_c')].inner.function.header.abi" '{"C": {"unwind": false}}'
|
||||||
pub extern "C" fn abi_c() {}
|
pub extern "C" fn abi_c() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='abi_system')].inner.function.header.abi" '{"System": {"unwind": false}}'
|
//@ is "$.index[*][?(@.name=='abi_system')].inner.function.header.abi" '{"System": {"unwind": false}}'
|
||||||
pub extern "system" fn abi_system() {}
|
pub extern "system" fn abi_system() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='abi_c_unwind')].inner.function.header.abi" '{"C": {"unwind": true}}'
|
//@ is "$.index[*][?(@.name=='abi_c_unwind')].inner.function.header.abi" '{"C": {"unwind": true}}'
|
||||||
pub extern "C-unwind" fn abi_c_unwind() {}
|
pub extern "C-unwind" fn abi_c_unwind() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='abi_system_unwind')].inner.function.header.abi" '{"System": {"unwind": true}}'
|
//@ is "$.index[*][?(@.name=='abi_system_unwind')].inner.function.header.abi" '{"System": {"unwind": true}}'
|
||||||
pub extern "system-unwind" fn abi_system_unwind() {}
|
pub extern "system-unwind" fn abi_system_unwind() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='abi_vectorcall')].inner.function.header.abi.Other" '"\"vectorcall\""'
|
//@ is "$.index[*][?(@.name=='abi_vectorcall')].inner.function.header.abi.Other" '"\"vectorcall\""'
|
||||||
pub extern "vectorcall" fn abi_vectorcall() {}
|
pub extern "vectorcall" fn abi_vectorcall() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='abi_vectorcall_unwind')].inner.function.header.abi.Other" '"\"vectorcall-unwind\""'
|
//@ is "$.index[*][?(@.name=='abi_vectorcall_unwind')].inner.function.header.abi.Other" '"\"vectorcall-unwind\""'
|
||||||
pub extern "vectorcall-unwind" fn abi_vectorcall_unwind() {}
|
pub extern "vectorcall-unwind" fn abi_vectorcall_unwind() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait Bar {
|
pub trait Bar {
|
||||||
// @is "$.index[*][?(@.name=='trait_abi_rust')].inner.function.header.abi" \"Rust\"
|
//@ is "$.index[*][?(@.name=='trait_abi_rust')].inner.function.header.abi" \"Rust\"
|
||||||
fn trait_abi_rust() {}
|
fn trait_abi_rust() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='trait_abi_c')].inner.function.header.abi" '{"C": {"unwind": false}}'
|
//@ is "$.index[*][?(@.name=='trait_abi_c')].inner.function.header.abi" '{"C": {"unwind": false}}'
|
||||||
extern "C" fn trait_abi_c() {}
|
extern "C" fn trait_abi_c() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='trait_abi_system')].inner.function.header.abi" '{"System": {"unwind": false}}'
|
//@ is "$.index[*][?(@.name=='trait_abi_system')].inner.function.header.abi" '{"System": {"unwind": false}}'
|
||||||
extern "system" fn trait_abi_system() {}
|
extern "system" fn trait_abi_system() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='trait_abi_c_unwind')].inner.function.header.abi" '{"C": {"unwind": true}}'
|
//@ is "$.index[*][?(@.name=='trait_abi_c_unwind')].inner.function.header.abi" '{"C": {"unwind": true}}'
|
||||||
extern "C-unwind" fn trait_abi_c_unwind() {}
|
extern "C-unwind" fn trait_abi_c_unwind() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='trait_abi_system_unwind')].inner.function.header.abi" '{"System": {"unwind": true}}'
|
//@ is "$.index[*][?(@.name=='trait_abi_system_unwind')].inner.function.header.abi" '{"System": {"unwind": true}}'
|
||||||
extern "system-unwind" fn trait_abi_system_unwind() {}
|
extern "system-unwind" fn trait_abi_system_unwind() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='trait_abi_vectorcall')].inner.function.header.abi.Other" '"\"vectorcall\""'
|
//@ is "$.index[*][?(@.name=='trait_abi_vectorcall')].inner.function.header.abi.Other" '"\"vectorcall\""'
|
||||||
extern "vectorcall" fn trait_abi_vectorcall() {}
|
extern "vectorcall" fn trait_abi_vectorcall() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='trait_abi_vectorcall_unwind')].inner.function.header.abi.Other" '"\"vectorcall-unwind\""'
|
//@ is "$.index[*][?(@.name=='trait_abi_vectorcall_unwind')].inner.function.header.abi.Other" '"\"vectorcall-unwind\""'
|
||||||
extern "vectorcall-unwind" fn trait_abi_vectorcall_unwind() {}
|
extern "vectorcall-unwind" fn trait_abi_vectorcall_unwind() {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,34 +3,34 @@
|
||||||
pub struct Foo;
|
pub struct Foo;
|
||||||
|
|
||||||
impl Foo {
|
impl Foo {
|
||||||
// @is "$.index[*][?(@.name=='const_meth')].inner.function.header.async" false
|
//@ is "$.index[*][?(@.name=='const_meth')].inner.function.header.async" false
|
||||||
// @is "$.index[*][?(@.name=='const_meth')].inner.function.header.const" true
|
//@ is "$.index[*][?(@.name=='const_meth')].inner.function.header.const" true
|
||||||
// @is "$.index[*][?(@.name=='const_meth')].inner.function.header.unsafe" false
|
//@ is "$.index[*][?(@.name=='const_meth')].inner.function.header.unsafe" false
|
||||||
pub const fn const_meth() {}
|
pub const fn const_meth() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='nothing_meth')].inner.function.header.async" false
|
//@ is "$.index[*][?(@.name=='nothing_meth')].inner.function.header.async" false
|
||||||
// @is "$.index[*][?(@.name=='nothing_meth')].inner.function.header.const" false
|
//@ is "$.index[*][?(@.name=='nothing_meth')].inner.function.header.const" false
|
||||||
// @is "$.index[*][?(@.name=='nothing_meth')].inner.function.header.unsafe" false
|
//@ is "$.index[*][?(@.name=='nothing_meth')].inner.function.header.unsafe" false
|
||||||
pub fn nothing_meth() {}
|
pub fn nothing_meth() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='unsafe_meth')].inner.function.header.async" false
|
//@ is "$.index[*][?(@.name=='unsafe_meth')].inner.function.header.async" false
|
||||||
// @is "$.index[*][?(@.name=='unsafe_meth')].inner.function.header.const" false
|
//@ is "$.index[*][?(@.name=='unsafe_meth')].inner.function.header.const" false
|
||||||
// @is "$.index[*][?(@.name=='unsafe_meth')].inner.function.header.unsafe" true
|
//@ is "$.index[*][?(@.name=='unsafe_meth')].inner.function.header.unsafe" true
|
||||||
pub unsafe fn unsafe_meth() {}
|
pub unsafe fn unsafe_meth() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='async_meth')].inner.function.header.async" true
|
//@ is "$.index[*][?(@.name=='async_meth')].inner.function.header.async" true
|
||||||
// @is "$.index[*][?(@.name=='async_meth')].inner.function.header.const" false
|
//@ is "$.index[*][?(@.name=='async_meth')].inner.function.header.const" false
|
||||||
// @is "$.index[*][?(@.name=='async_meth')].inner.function.header.unsafe" false
|
//@ is "$.index[*][?(@.name=='async_meth')].inner.function.header.unsafe" false
|
||||||
pub async fn async_meth() {}
|
pub async fn async_meth() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='async_unsafe_meth')].inner.function.header.async" true
|
//@ is "$.index[*][?(@.name=='async_unsafe_meth')].inner.function.header.async" true
|
||||||
// @is "$.index[*][?(@.name=='async_unsafe_meth')].inner.function.header.const" false
|
//@ is "$.index[*][?(@.name=='async_unsafe_meth')].inner.function.header.const" false
|
||||||
// @is "$.index[*][?(@.name=='async_unsafe_meth')].inner.function.header.unsafe" true
|
//@ is "$.index[*][?(@.name=='async_unsafe_meth')].inner.function.header.unsafe" true
|
||||||
pub async unsafe fn async_unsafe_meth() {}
|
pub async unsafe fn async_unsafe_meth() {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='const_unsafe_meth')].inner.function.header.async" false
|
//@ is "$.index[*][?(@.name=='const_unsafe_meth')].inner.function.header.async" false
|
||||||
// @is "$.index[*][?(@.name=='const_unsafe_meth')].inner.function.header.const" true
|
//@ is "$.index[*][?(@.name=='const_unsafe_meth')].inner.function.header.const" true
|
||||||
// @is "$.index[*][?(@.name=='const_unsafe_meth')].inner.function.header.unsafe" true
|
//@ is "$.index[*][?(@.name=='const_unsafe_meth')].inner.function.header.unsafe" true
|
||||||
pub const unsafe fn const_unsafe_meth() {}
|
pub const unsafe fn const_unsafe_meth() {}
|
||||||
|
|
||||||
// It's impossible for a method to be both const and async, so no test for that
|
// It's impossible for a method to be both const and async, so no test for that
|
||||||
|
|
|
@ -1,32 +1,32 @@
|
||||||
//@ edition:2018
|
//@ edition:2018
|
||||||
//@ compile-flags: --crate-version 1.0.0
|
//@ compile-flags: --crate-version 1.0.0
|
||||||
|
|
||||||
// @is "$.crate_version" \"1.0.0\"
|
//@ is "$.crate_version" \"1.0.0\"
|
||||||
// @has "$.index[*][?(@.name=='nested')].inner.module"
|
//@ has "$.index[*][?(@.name=='nested')].inner.module"
|
||||||
// @is "$.index[*][?(@.name=='nested')].inner.module.is_crate" true
|
//@ is "$.index[*][?(@.name=='nested')].inner.module.is_crate" true
|
||||||
|
|
||||||
// @set l1_id = "$.index[*][?(@.name=='l1')].id"
|
//@ set l1_id = "$.index[*][?(@.name=='l1')].id"
|
||||||
// @ismany "$.index[*][?(@.name=='nested')].inner.module.items[*]" $l1_id
|
//@ ismany "$.index[*][?(@.name=='nested')].inner.module.items[*]" $l1_id
|
||||||
|
|
||||||
// @has "$.index[*][?(@.name=='l1')].inner.module"
|
//@ has "$.index[*][?(@.name=='l1')].inner.module"
|
||||||
// @is "$.index[*][?(@.name=='l1')].inner.module.is_crate" false
|
//@ is "$.index[*][?(@.name=='l1')].inner.module.is_crate" false
|
||||||
pub mod l1 {
|
pub mod l1 {
|
||||||
// @has "$.index[*][?(@.name=='l3')].inner.module"
|
//@ has "$.index[*][?(@.name=='l3')].inner.module"
|
||||||
// @is "$.index[*][?(@.name=='l3')].inner.module.is_crate" false
|
//@ is "$.index[*][?(@.name=='l3')].inner.module.is_crate" false
|
||||||
// @set l3_id = "$.index[*][?(@.name=='l3')].id"
|
//@ set l3_id = "$.index[*][?(@.name=='l3')].id"
|
||||||
pub mod l3 {
|
pub mod l3 {
|
||||||
|
|
||||||
// @has "$.index[*][?(@.name=='L4')].inner.struct"
|
//@ has "$.index[*][?(@.name=='L4')].inner.struct"
|
||||||
// @is "$.index[*][?(@.name=='L4')].inner.struct.kind" '"unit"'
|
//@ is "$.index[*][?(@.name=='L4')].inner.struct.kind" '"unit"'
|
||||||
// @set l4_id = "$.index[*][?(@.name=='L4')].id"
|
//@ set l4_id = "$.index[*][?(@.name=='L4')].id"
|
||||||
// @ismany "$.index[*][?(@.name=='l3')].inner.module.items[*]" $l4_id
|
//@ ismany "$.index[*][?(@.name=='l3')].inner.module.items[*]" $l4_id
|
||||||
pub struct L4;
|
pub struct L4;
|
||||||
}
|
}
|
||||||
// @is "$.index[*][?(@.inner.import)].inner.import.glob" false
|
//@ is "$.index[*][?(@.inner.import)].inner.import.glob" false
|
||||||
// @is "$.index[*][?(@.inner.import)].inner.import.source" '"l3::L4"'
|
//@ is "$.index[*][?(@.inner.import)].inner.import.source" '"l3::L4"'
|
||||||
// @is "$.index[*][?(@.inner.import)].inner.import.glob" false
|
//@ is "$.index[*][?(@.inner.import)].inner.import.glob" false
|
||||||
// @is "$.index[*][?(@.inner.import)].inner.import.id" $l4_id
|
//@ is "$.index[*][?(@.inner.import)].inner.import.id" $l4_id
|
||||||
// @set l4_use_id = "$.index[*][?(@.inner.import)].id"
|
//@ set l4_use_id = "$.index[*][?(@.inner.import)].id"
|
||||||
pub use l3::L4;
|
pub use l3::L4;
|
||||||
}
|
}
|
||||||
// @ismany "$.index[*][?(@.name=='l1')].inner.module.items[*]" $l3_id $l4_use_id
|
//@ ismany "$.index[*][?(@.name=='l1')].inner.module.items[*]" $l3_id $l4_use_id
|
||||||
|
|
|
@ -7,11 +7,11 @@ pub trait Trait {}
|
||||||
|
|
||||||
pub struct Wrapper<T_>(std::marker::PhantomData<T_>);
|
pub struct Wrapper<T_>(std::marker::PhantomData<T_>);
|
||||||
|
|
||||||
// @count "$.index[*][?(@.name=='foo')].inner.function.generics.where_predicates[0].bound_predicate.generic_params[*]" 2
|
//@ count "$.index[*][?(@.name=='foo')].inner.function.generics.where_predicates[0].bound_predicate.generic_params[*]" 2
|
||||||
// @is "$.index[*][?(@.name=='foo')].inner.function.generics.where_predicates[0].bound_predicate.generic_params[0].name" \"\'a\"
|
//@ is "$.index[*][?(@.name=='foo')].inner.function.generics.where_predicates[0].bound_predicate.generic_params[0].name" \"\'a\"
|
||||||
// @is "$.index[*][?(@.name=='foo')].inner.function.generics.where_predicates[0].bound_predicate.generic_params[0].kind" '{ "lifetime": { "outlives": [] } }'
|
//@ is "$.index[*][?(@.name=='foo')].inner.function.generics.where_predicates[0].bound_predicate.generic_params[0].kind" '{ "lifetime": { "outlives": [] } }'
|
||||||
// @is "$.index[*][?(@.name=='foo')].inner.function.generics.where_predicates[0].bound_predicate.generic_params[1].name" \"T\"
|
//@ is "$.index[*][?(@.name=='foo')].inner.function.generics.where_predicates[0].bound_predicate.generic_params[1].name" \"T\"
|
||||||
// @is "$.index[*][?(@.name=='foo')].inner.function.generics.where_predicates[0].bound_predicate.generic_params[1].kind" '{ "type": { "bounds": [], "default": null, "synthetic": false } }'
|
//@ is "$.index[*][?(@.name=='foo')].inner.function.generics.where_predicates[0].bound_predicate.generic_params[1].kind" '{ "type": { "bounds": [], "default": null, "synthetic": false } }'
|
||||||
pub fn foo()
|
pub fn foo()
|
||||||
where
|
where
|
||||||
for<'a, T> &'a Wrapper<T>: Trait,
|
for<'a, T> &'a Wrapper<T>: Trait,
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
// This is a regression test for #98009.
|
// This is a regression test for #98009.
|
||||||
|
|
||||||
// @has "$.index[*][?(@.name=='this_compiles')]"
|
//@ has "$.index[*][?(@.name=='this_compiles')]"
|
||||||
// @has "$.index[*][?(@.name=='this_does_not')]"
|
//@ has "$.index[*][?(@.name=='this_does_not')]"
|
||||||
// @has "$.index[*][?(@.name=='Events')]"
|
//@ has "$.index[*][?(@.name=='Events')]"
|
||||||
// @has "$.index[*][?(@.name=='Other')]"
|
//@ has "$.index[*][?(@.name=='Other')]"
|
||||||
// @has "$.index[*][?(@.name=='Trait')]"
|
//@ has "$.index[*][?(@.name=='Trait')]"
|
||||||
|
|
||||||
struct Events<R>(R);
|
struct Events<R>(R);
|
||||||
|
|
||||||
|
|
|
@ -11,11 +11,11 @@
|
||||||
#[rustc_doc_primitive = "i32"]
|
#[rustc_doc_primitive = "i32"]
|
||||||
mod prim_i32 {}
|
mod prim_i32 {}
|
||||||
|
|
||||||
// @set local_i32 = "$.index[*][?(@.name=='i32')].id"
|
//@ set local_i32 = "$.index[*][?(@.name=='i32')].id"
|
||||||
|
|
||||||
// @has "$.index[*][?(@.name=='local_primitive')]"
|
//@ has "$.index[*][?(@.name=='local_primitive')]"
|
||||||
// @ismany "$.index[*][?(@.name=='local_primitive')].inner.module.items[*]" $local_i32
|
//@ ismany "$.index[*][?(@.name=='local_primitive')].inner.module.items[*]" $local_i32
|
||||||
// @is "$.index[*][?(@.name=='local_primitive')].links['prim@i32']" $local_i32
|
//@ is "$.index[*][?(@.name=='local_primitive')].links['prim@i32']" $local_i32
|
||||||
|
|
||||||
// Let's ensure the `prim_i32` module isn't present in the output JSON:
|
// Let's ensure the `prim_i32` module isn't present in the output JSON:
|
||||||
// @!has "$.index[*][?(@.name=='prim_i32')]"
|
//@ !has "$.index[*][?(@.name=='prim_i32')]"
|
||||||
|
|
|
@ -4,23 +4,23 @@
|
||||||
#![no_core]
|
#![no_core]
|
||||||
#![rustc_coherence_is_core]
|
#![rustc_coherence_is_core]
|
||||||
|
|
||||||
// @set impl_i32 = "$.index[*][?(@.docs=='Only core can do this')].id"
|
//@ set impl_i32 = "$.index[*][?(@.docs=='Only core can do this')].id"
|
||||||
|
|
||||||
/// Only core can do this
|
/// Only core can do this
|
||||||
impl i32 {
|
impl i32 {
|
||||||
// @set identity = "$.index[*][?(@.docs=='Do Nothing')].id"
|
//@ set identity = "$.index[*][?(@.docs=='Do Nothing')].id"
|
||||||
|
|
||||||
/// Do Nothing
|
/// Do Nothing
|
||||||
pub fn identity(self) -> Self {
|
pub fn identity(self) -> Self {
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.docs=='Only core can do this')].inner.impl.items[*]" $identity
|
//@ is "$.index[*][?(@.docs=='Only core can do this')].inner.impl.items[*]" $identity
|
||||||
}
|
}
|
||||||
|
|
||||||
// @set Trait = "$.index[*][?(@.name=='Trait')].id"
|
//@ set Trait = "$.index[*][?(@.name=='Trait')].id"
|
||||||
pub trait Trait {}
|
pub trait Trait {}
|
||||||
// @set impl_trait_for_i32 = "$.index[*][?(@.docs=='impl Trait for i32')].id"
|
//@ set impl_trait_for_i32 = "$.index[*][?(@.docs=='impl Trait for i32')].id"
|
||||||
/// impl Trait for i32
|
/// impl Trait for i32
|
||||||
impl Trait for i32 {}
|
impl Trait for i32 {}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ impl Trait for i32 {}
|
||||||
#[rustc_doc_primitive = "i32"]
|
#[rustc_doc_primitive = "i32"]
|
||||||
mod prim_i32 {}
|
mod prim_i32 {}
|
||||||
|
|
||||||
// @set i32 = "$.index[*][?(@.docs=='i32')].id"
|
//@ set i32 = "$.index[*][?(@.docs=='i32')].id"
|
||||||
// @is "$.index[*][?(@.docs=='i32')].name" '"i32"'
|
//@ is "$.index[*][?(@.docs=='i32')].name" '"i32"'
|
||||||
// @is "$.index[*][?(@.docs=='i32')].inner.primitive.name" '"i32"'
|
//@ is "$.index[*][?(@.docs=='i32')].inner.primitive.name" '"i32"'
|
||||||
// @ismany "$.index[*][?(@.docs=='i32')].inner.primitive.impls[*]" $impl_i32 $impl_trait_for_i32
|
//@ ismany "$.index[*][?(@.docs=='i32')].inner.primitive.impls[*]" $impl_i32 $impl_trait_for_i32
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
#![feature(rustc_attrs)]
|
||||||
|
|
||||||
// @has "$.index[*][?(@.name=='usize')]"
|
//@ has "$.index[*][?(@.name=='usize')]"
|
||||||
// @has "$.index[*][?(@.name=='prim')]"
|
//@ has "$.index[*][?(@.name=='prim')]"
|
||||||
|
|
||||||
#[rustc_doc_primitive = "usize"]
|
#[rustc_doc_primitive = "usize"]
|
||||||
/// This is the built-in type `usize`.
|
/// This is the built-in type `usize`.
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
#![feature(never_type)]
|
#![feature(never_type)]
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='PrimNever')].visibility" \"public\"
|
//@ is "$.index[*][?(@.name=='PrimNever')].visibility" \"public\"
|
||||||
// @is "$.index[*][?(@.name=='PrimNever')].inner.type_alias.type.primitive" \"never\"
|
//@ is "$.index[*][?(@.name=='PrimNever')].inner.type_alias.type.primitive" \"never\"
|
||||||
pub type PrimNever = !;
|
pub type PrimNever = !;
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='PrimStr')].inner.type_alias.type.primitive" \"str\"
|
//@ is "$.index[*][?(@.name=='PrimStr')].inner.type_alias.type.primitive" \"str\"
|
||||||
pub type PrimStr = str;
|
pub type PrimStr = str;
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='PrimBool')].inner.type_alias.type.primitive" \"bool\"
|
//@ is "$.index[*][?(@.name=='PrimBool')].inner.type_alias.type.primitive" \"bool\"
|
||||||
pub type PrimBool = bool;
|
pub type PrimBool = bool;
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='PrimChar')].inner.type_alias.type.primitive" \"char\"
|
//@ is "$.index[*][?(@.name=='PrimChar')].inner.type_alias.type.primitive" \"char\"
|
||||||
pub type PrimChar = char;
|
pub type PrimChar = char;
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='PrimU8')].inner.type_alias.type.primitive" \"u8\"
|
//@ is "$.index[*][?(@.name=='PrimU8')].inner.type_alias.type.primitive" \"u8\"
|
||||||
pub type PrimU8 = u8;
|
pub type PrimU8 = u8;
|
||||||
|
|
|
@ -5,16 +5,16 @@
|
||||||
#[rustc_doc_primitive = "usize"]
|
#[rustc_doc_primitive = "usize"]
|
||||||
mod usize {}
|
mod usize {}
|
||||||
|
|
||||||
// @set local_crate_id = "$.index[*][?(@.name=='use_primitive')].crate_id"
|
//@ set local_crate_id = "$.index[*][?(@.name=='use_primitive')].crate_id"
|
||||||
|
|
||||||
// @has "$.index[*][?(@.name=='ilog10')]"
|
//@ has "$.index[*][?(@.name=='ilog10')]"
|
||||||
// @!is "$.index[*][?(@.name=='ilog10')].crate_id" $local_crate_id
|
//@ !is "$.index[*][?(@.name=='ilog10')].crate_id" $local_crate_id
|
||||||
// @has "$.index[*][?(@.name=='checked_add')]"
|
//@ has "$.index[*][?(@.name=='checked_add')]"
|
||||||
// @!is "$.index[*][?(@.name=='checked_add')]" $local_crate_id
|
//@ !is "$.index[*][?(@.name=='checked_add')]" $local_crate_id
|
||||||
// @!has "$.index[*][?(@.name=='is_ascii_uppercase')]"
|
//@ !has "$.index[*][?(@.name=='is_ascii_uppercase')]"
|
||||||
|
|
||||||
// @is "$.index[*].inner.import[?(@.name=='my_i32')].id" null
|
//@ is "$.index[*].inner.import[?(@.name=='my_i32')].id" null
|
||||||
pub use i32 as my_i32;
|
pub use i32 as my_i32;
|
||||||
|
|
||||||
// @is "$.index[*].inner.import[?(@.name=='u32')].id" null
|
//@ is "$.index[*].inner.import[?(@.name=='u32')].id" null
|
||||||
pub use u32;
|
pub use u32;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#[doc(inline)]
|
#[doc(inline)]
|
||||||
pub extern crate enum_with_discriminant;
|
pub extern crate enum_with_discriminant;
|
||||||
|
|
||||||
// @!has '$.index[*][?(@.docs == "Should not be inlined")]'
|
//@ !has '$.index[*][?(@.docs == "Should not be inlined")]'
|
||||||
// @has '$.index[*][?(@.name == "enum_with_discriminant")].inner.extern_crate'
|
//@ has '$.index[*][?(@.name == "enum_with_discriminant")].inner.extern_crate'
|
||||||
// @set enum_with_discriminant = '$.index[*][?(@.name == "enum_with_discriminant")].id'
|
//@ set enum_with_discriminant = '$.index[*][?(@.name == "enum_with_discriminant")].id'
|
||||||
// @is '$.index[*][?(@.name == "doc_inline_external_crate")].inner.module.items[*]' $enum_with_discriminant
|
//@ is '$.index[*][?(@.name == "doc_inline_external_crate")].inner.module.items[*]' $enum_with_discriminant
|
||||||
|
|
|
@ -4,5 +4,5 @@
|
||||||
|
|
||||||
// ignore-tidy-linelength
|
// ignore-tidy-linelength
|
||||||
|
|
||||||
// @is "$.index[*][?(@.inner.module)].name" \"export_extern_crate_as_self\"
|
//@ is "$.index[*][?(@.inner.module)].name" \"export_extern_crate_as_self\"
|
||||||
pub extern crate self as export_extern_crate_as_self; // Must be the same name as the crate already has
|
pub extern crate self as export_extern_crate_as_self; // Must be the same name as the crate already has
|
||||||
|
|
|
@ -5,7 +5,7 @@ extern crate enum_with_discriminant;
|
||||||
#[doc(inline)]
|
#[doc(inline)]
|
||||||
pub use enum_with_discriminant::*;
|
pub use enum_with_discriminant::*;
|
||||||
|
|
||||||
// @!has '$.index[*][?(@.docs == "Should not be inlined")]'
|
//@ !has '$.index[*][?(@.docs == "Should not be inlined")]'
|
||||||
// @is '$.index[*][?(@.inner.import)].inner.import.name' \"enum_with_discriminant\"
|
//@ is '$.index[*][?(@.inner.import)].inner.import.name' \"enum_with_discriminant\"
|
||||||
// @set use = '$.index[*][?(@.inner.import)].id'
|
//@ set use = '$.index[*][?(@.inner.import)].id'
|
||||||
// @is '$.index[*][?(@.name == "extern_crate_glob")].inner.module.items[*]' $use
|
//@ is '$.index[*][?(@.name == "extern_crate_glob")].inner.module.items[*]' $use
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
// Regression test for https://github.com/rust-lang/rust/issues/100973
|
// Regression test for https://github.com/rust-lang/rust/issues/100973
|
||||||
|
|
||||||
// @set m1 = "$.index[*][?(@.name == 'm1' && @.inner.module)].id"
|
//@ set m1 = "$.index[*][?(@.name == 'm1' && @.inner.module)].id"
|
||||||
// @is "$.index[*][?(@.name == 'm1')].inner.module.items" []
|
//@ is "$.index[*][?(@.name == 'm1')].inner.module.items" []
|
||||||
// @is "$.index[*][?(@.name == 'm1')].inner.module.is_stripped" true
|
//@ is "$.index[*][?(@.name == 'm1')].inner.module.is_stripped" true
|
||||||
mod m1 {
|
mod m1 {
|
||||||
pub fn f() {}
|
pub fn f() {}
|
||||||
}
|
}
|
||||||
// @set m2 = "$.index[*][?(@.name == 'm2' && @.inner.module)].id"
|
//@ set m2 = "$.index[*][?(@.name == 'm2' && @.inner.module)].id"
|
||||||
// @is "$.index[*][?(@.name == 'm2')].inner.module.items" []
|
//@ is "$.index[*][?(@.name == 'm2')].inner.module.items" []
|
||||||
// @is "$.index[*][?(@.name == 'm2')].inner.module.is_stripped" true
|
//@ is "$.index[*][?(@.name == 'm2')].inner.module.is_stripped" true
|
||||||
mod m2 {
|
mod m2 {
|
||||||
pub fn f(_: u8) {}
|
pub fn f(_: u8) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// @set m1_use = "$.index[*][?(@.docs=='m1 re-export')].id"
|
//@ set m1_use = "$.index[*][?(@.docs=='m1 re-export')].id"
|
||||||
// @is "$.index[*].inner.import[?(@.name=='m1')].id" $m1
|
//@ is "$.index[*].inner.import[?(@.name=='m1')].id" $m1
|
||||||
// @is "$.index[*].inner.import[?(@.name=='m1')].glob" true
|
//@ is "$.index[*].inner.import[?(@.name=='m1')].glob" true
|
||||||
/// m1 re-export
|
/// m1 re-export
|
||||||
pub use m1::*;
|
pub use m1::*;
|
||||||
// @set m2_use = "$.index[*][?(@.docs=='m2 re-export')].id"
|
//@ set m2_use = "$.index[*][?(@.docs=='m2 re-export')].id"
|
||||||
// @is "$.index[*].inner.import[?(@.name=='m2')].id" $m2
|
//@ is "$.index[*].inner.import[?(@.name=='m2')].id" $m2
|
||||||
// @is "$.index[*].inner.import[?(@.name=='m2')].glob" true
|
//@ is "$.index[*].inner.import[?(@.name=='m2')].glob" true
|
||||||
/// m2 re-export
|
/// m2 re-export
|
||||||
pub use m2::*;
|
pub use m2::*;
|
||||||
|
|
||||||
// @ismany "$.index[*].inner.module[?(@.is_crate==true)].items[*]" $m1_use $m2_use
|
//@ ismany "$.index[*].inner.module[?(@.is_crate==true)].items[*]" $m1_use $m2_use
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Regression test for https://github.com/rust-lang/rust/issues/100973
|
// Regression test for https://github.com/rust-lang/rust/issues/100973
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='m1' && @.inner.module)].inner.module.is_stripped" true
|
//@ is "$.index[*][?(@.name=='m1' && @.inner.module)].inner.module.is_stripped" true
|
||||||
// @set m1 = "$.index[*][?(@.name=='m1')].id"
|
//@ set m1 = "$.index[*][?(@.name=='m1')].id"
|
||||||
mod m1 {}
|
mod m1 {}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.inner.import)].inner.import.id" $m1
|
//@ is "$.index[*][?(@.inner.import)].inner.import.id" $m1
|
||||||
pub use m1::*;
|
pub use m1::*;
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
//@ edition:2018
|
//@ edition:2018
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='mod1')].inner.module.is_stripped" "true"
|
//@ is "$.index[*][?(@.name=='mod1')].inner.module.is_stripped" "true"
|
||||||
mod mod1 {
|
mod mod1 {
|
||||||
extern "C" {
|
extern "C" {
|
||||||
// @set public_fn_id = "$.index[*][?(@.name=='public_fn')].id"
|
//@ set public_fn_id = "$.index[*][?(@.name=='public_fn')].id"
|
||||||
pub fn public_fn();
|
pub fn public_fn();
|
||||||
// @!has "$.index[*][?(@.name=='private_fn')]"
|
//@ !has "$.index[*][?(@.name=='private_fn')]"
|
||||||
fn private_fn();
|
fn private_fn();
|
||||||
}
|
}
|
||||||
// @ismany "$.index[*][?(@.name=='mod1')].inner.module.items[*]" $public_fn_id
|
//@ ismany "$.index[*][?(@.name=='mod1')].inner.module.items[*]" $public_fn_id
|
||||||
// @set mod1_id = "$.index[*][?(@.name=='mod1')].id"
|
//@ set mod1_id = "$.index[*][?(@.name=='mod1')].id"
|
||||||
}
|
}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.inner.import)].inner.import.glob" true
|
//@ is "$.index[*][?(@.inner.import)].inner.import.glob" true
|
||||||
// @is "$.index[*][?(@.inner.import)].inner.import.id" $mod1_id
|
//@ is "$.index[*][?(@.inner.import)].inner.import.id" $mod1_id
|
||||||
// @set use_id = "$.index[*][?(@.inner.import)].id"
|
//@ set use_id = "$.index[*][?(@.inner.import)].id"
|
||||||
// @ismany "$.index[*][?(@.name=='glob_extern')].inner.module.items[*]" $use_id
|
//@ ismany "$.index[*][?(@.name=='glob_extern')].inner.module.items[*]" $use_id
|
||||||
pub use mod1::*;
|
pub use mod1::*;
|
||||||
|
|
|
@ -1,32 +1,32 @@
|
||||||
//@ edition:2018
|
//@ edition:2018
|
||||||
|
|
||||||
// @is "$.index[*][?(@.name=='mod1')].inner.module.is_stripped" "true"
|
//@ is "$.index[*][?(@.name=='mod1')].inner.module.is_stripped" "true"
|
||||||
mod mod1 {
|
mod mod1 {
|
||||||
// @is "$.index[*][?(@.name=='mod2')].inner.module.is_stripped" "true"
|
//@ is "$.index[*][?(@.name=='mod2')].inner.module.is_stripped" "true"
|
||||||
mod mod2 {
|
mod mod2 {
|
||||||
// @set m2pub_id = "$.index[*][?(@.name=='Mod2Public')].id"
|
//@ set m2pub_id = "$.index[*][?(@.name=='Mod2Public')].id"
|
||||||
pub struct Mod2Public;
|
pub struct Mod2Public;
|
||||||
|
|
||||||
// @!has "$.index[*][?(@.name=='Mod2Private')]"
|
//@ !has "$.index[*][?(@.name=='Mod2Private')]"
|
||||||
struct Mod2Private;
|
struct Mod2Private;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @set mod2_use_id = "$.index[*][?(@.docs=='Mod2 re-export')].id"
|
//@ set mod2_use_id = "$.index[*][?(@.docs=='Mod2 re-export')].id"
|
||||||
// @is "$.index[*][?(@.docs=='Mod2 re-export')].inner.import.name" \"mod2\"
|
//@ is "$.index[*][?(@.docs=='Mod2 re-export')].inner.import.name" \"mod2\"
|
||||||
/// Mod2 re-export
|
/// Mod2 re-export
|
||||||
pub use self::mod2::*;
|
pub use self::mod2::*;
|
||||||
|
|
||||||
// @set m1pub_id = "$.index[*][?(@.name=='Mod1Public')].id"
|
//@ set m1pub_id = "$.index[*][?(@.name=='Mod1Public')].id"
|
||||||
pub struct Mod1Public;
|
pub struct Mod1Public;
|
||||||
// @!has "$.index[*][?(@.name=='Mod1Private')]"
|
//@ !has "$.index[*][?(@.name=='Mod1Private')]"
|
||||||
struct Mod1Private;
|
struct Mod1Private;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @set mod1_use_id = "$.index[*][?(@.docs=='Mod1 re-export')].id"
|
//@ set mod1_use_id = "$.index[*][?(@.docs=='Mod1 re-export')].id"
|
||||||
// @is "$.index[*][?(@.docs=='Mod1 re-export')].inner.import.name" \"mod1\"
|
//@ is "$.index[*][?(@.docs=='Mod1 re-export')].inner.import.name" \"mod1\"
|
||||||
/// Mod1 re-export
|
/// Mod1 re-export
|
||||||
pub use mod1::*;
|
pub use mod1::*;
|
||||||
|
|
||||||
// @ismany "$.index[*][?(@.name=='mod2')].inner.module.items[*]" $m2pub_id
|
//@ ismany "$.index[*][?(@.name=='mod2')].inner.module.items[*]" $m2pub_id
|
||||||
// @ismany "$.index[*][?(@.name=='mod1')].inner.module.items[*]" $m1pub_id $mod2_use_id
|
//@ ismany "$.index[*][?(@.name=='mod1')].inner.module.items[*]" $m1pub_id $mod2_use_id
|
||||||
// @ismany "$.index[*][?(@.name=='glob_private')].inner.module.items[*]" $mod1_use_id
|
//@ ismany "$.index[*][?(@.name=='glob_private')].inner.module.items[*]" $mod1_use_id
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
// @!has "$.index[*][?(@.name=='foo')]"
|
//@ !has "$.index[*][?(@.name=='foo')]"
|
||||||
mod foo {
|
mod foo {
|
||||||
// @has "$.index[*][?(@.name=='Foo')]"
|
//@ has "$.index[*][?(@.name=='Foo')]"
|
||||||
pub struct Foo;
|
pub struct Foo;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @has "$.index[*].inner[?(@.import.source=='foo::Foo')]"
|
//@ has "$.index[*].inner[?(@.import.source=='foo::Foo')]"
|
||||||
pub use foo::Foo;
|
pub use foo::Foo;
|
||||||
|
|
||||||
pub mod bar {
|
pub mod bar {
|
||||||
// @has "$.index[*].inner[?(@.import.source=='crate::foo::Foo')]"
|
//@ has "$.index[*].inner[?(@.import.source=='crate::foo::Foo')]"
|
||||||
pub use crate::foo::Foo;
|
pub use crate::foo::Foo;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
pub mod foo {
|
pub mod foo {
|
||||||
// @set bar_id = "$.index[*][?(@.name=='Bar')].id"
|
//@ set bar_id = "$.index[*][?(@.name=='Bar')].id"
|
||||||
// @ismany "$.index[*][?(@.name=='foo')].inner.module.items[*]" $bar_id
|
//@ ismany "$.index[*][?(@.name=='foo')].inner.module.items[*]" $bar_id
|
||||||
pub struct Bar;
|
pub struct Bar;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @set root_import_id = "$.index[*][?(@.docs=='Outer re-export')].id"
|
//@ set root_import_id = "$.index[*][?(@.docs=='Outer re-export')].id"
|
||||||
// @is "$.index[*].inner[?(@.import.source=='foo::Bar')].import.id" $bar_id
|
//@ is "$.index[*].inner[?(@.import.source=='foo::Bar')].import.id" $bar_id
|
||||||
// @has "$.index[*][?(@.name=='in_root_and_mod_pub')].inner.module.items[*]" $root_import_id
|
//@ has "$.index[*][?(@.name=='in_root_and_mod_pub')].inner.module.items[*]" $root_import_id
|
||||||
/// Outer re-export
|
/// Outer re-export
|
||||||
pub use foo::Bar;
|
pub use foo::Bar;
|
||||||
|
|
||||||
pub mod baz {
|
pub mod baz {
|
||||||
// @set baz_import_id = "$.index[*][?(@.docs=='Inner re-export')].id"
|
//@ set baz_import_id = "$.index[*][?(@.docs=='Inner re-export')].id"
|
||||||
// @is "$.index[*].inner[?(@.import.source=='crate::foo::Bar')].import.id" $bar_id
|
//@ is "$.index[*].inner[?(@.import.source=='crate::foo::Bar')].import.id" $bar_id
|
||||||
// @ismany "$.index[*][?(@.name=='baz')].inner.module.items[*]" $baz_import_id
|
//@ ismany "$.index[*][?(@.name=='baz')].inner.module.items[*]" $baz_import_id
|
||||||
/// Inner re-export
|
/// Inner re-export
|
||||||
pub use crate::foo::Bar;
|
pub use crate::foo::Bar;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
//@ edition:2018
|
//@ edition:2018
|
||||||
|
|
||||||
// @set repro_id = "$.index[*][?(@.name=='repro')].id"
|
//@ set repro_id = "$.index[*][?(@.name=='repro')].id"
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! repro {
|
macro_rules! repro {
|
||||||
() => {};
|
() => {};
|
||||||
}
|
}
|
||||||
|
|
||||||
// @set repro2_id = "$.index[*][?(@.docs=='Re-export')].id"
|
//@ set repro2_id = "$.index[*][?(@.docs=='Re-export')].id"
|
||||||
/// Re-export
|
/// Re-export
|
||||||
pub use crate::repro as repro2;
|
pub use crate::repro as repro2;
|
||||||
|
|
||||||
// @ismany "$.index[*][?(@.name=='macro')].inner.module.items[*]" $repro_id $repro2_id
|
//@ ismany "$.index[*][?(@.name=='macro')].inner.module.items[*]" $repro_id $repro2_id
|
||||||
|
|
|
@ -6,6 +6,6 @@ mod m1 {
|
||||||
|
|
||||||
pub use m1::x;
|
pub use m1::x;
|
||||||
|
|
||||||
// @has "$.index[*][?(@.name=='x' && @.inner.function)]"
|
//@ has "$.index[*][?(@.name=='x' && @.inner.function)]"
|
||||||
// @has "$.index[*].inner[?(@.import.name=='x')].import.source" '"m1::x"'
|
//@ has "$.index[*].inner[?(@.import.name=='x')].import.source" '"m1::x"'
|
||||||
// @!has "$.index[*][?(@.name=='m1')]"
|
//@ !has "$.index[*][?(@.name=='m1')]"
|
||||||
|
|
|
@ -6,19 +6,19 @@
|
||||||
|
|
||||||
extern crate pub_struct as foo;
|
extern crate pub_struct as foo;
|
||||||
#[doc(inline)]
|
#[doc(inline)]
|
||||||
// @set crate_use_id = "$.index[*][?(@.docs=='Hack A')].id"
|
//@ set crate_use_id = "$.index[*][?(@.docs=='Hack A')].id"
|
||||||
// @set foo_id = "$.index[*][?(@.docs=='Hack A')].inner.import.id"
|
//@ set foo_id = "$.index[*][?(@.docs=='Hack A')].inner.import.id"
|
||||||
/// Hack A
|
/// Hack A
|
||||||
pub use foo::Foo;
|
pub use foo::Foo;
|
||||||
|
|
||||||
// @set bar_id = "$.index[*][?(@.name=='bar')].id"
|
//@ set bar_id = "$.index[*][?(@.name=='bar')].id"
|
||||||
pub mod bar {
|
pub mod bar {
|
||||||
// @is "$.index[*][?(@.docs=='Hack B')].inner.import.id" $foo_id
|
//@ is "$.index[*][?(@.docs=='Hack B')].inner.import.id" $foo_id
|
||||||
// @set bar_use_id = "$.index[*][?(@.docs=='Hack B')].id"
|
//@ set bar_use_id = "$.index[*][?(@.docs=='Hack B')].id"
|
||||||
// @ismany "$.index[*][?(@.name=='bar')].inner.module.items[*]" $bar_use_id
|
//@ ismany "$.index[*][?(@.name=='bar')].inner.module.items[*]" $bar_use_id
|
||||||
/// Hack B
|
/// Hack B
|
||||||
pub use foo::Foo;
|
pub use foo::Foo;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ismany "$.index[*][?(@.inner.import)].id" $crate_use_id $bar_use_id
|
//@ ismany "$.index[*][?(@.inner.import)].id" $crate_use_id $bar_use_id
|
||||||
// @ismany "$.index[*][?(@.name=='private_twice_one_inline')].inner.module.items[*]" $bar_id $crate_use_id
|
//@ ismany "$.index[*][?(@.name=='private_twice_one_inline')].inner.module.items[*]" $bar_id $crate_use_id
|
||||||
|
|
|
@ -3,21 +3,21 @@
|
||||||
// Test for the ICE in https://github.com/rust-lang/rust/issues/83720
|
// Test for the ICE in https://github.com/rust-lang/rust/issues/83720
|
||||||
// A pub-in-private type re-exported under two different names shouldn't cause an error
|
// A pub-in-private type re-exported under two different names shouldn't cause an error
|
||||||
|
|
||||||
// @!has "$.index[*][?(@.name=='style')]"
|
//@ !has "$.index[*][?(@.name=='style')]"
|
||||||
mod style {
|
mod style {
|
||||||
// @set color_struct_id = "$.index[*][?(@.inner.struct && @.name=='Color')].id"
|
//@ set color_struct_id = "$.index[*][?(@.inner.struct && @.name=='Color')].id"
|
||||||
pub struct Color;
|
pub struct Color;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.docs=='First re-export')].inner.import.id" $color_struct_id
|
//@ is "$.index[*][?(@.docs=='First re-export')].inner.import.id" $color_struct_id
|
||||||
// @is "$.index[*][?(@.docs=='First re-export')].inner.import.name" \"Color\"
|
//@ is "$.index[*][?(@.docs=='First re-export')].inner.import.name" \"Color\"
|
||||||
// @set color_export_id = "$.index[*][?(@.docs=='First re-export')].id"
|
//@ set color_export_id = "$.index[*][?(@.docs=='First re-export')].id"
|
||||||
/// First re-export
|
/// First re-export
|
||||||
pub use style::Color;
|
pub use style::Color;
|
||||||
// @is "$.index[*][?(@.docs=='Second re-export')].inner.import.id" $color_struct_id
|
//@ is "$.index[*][?(@.docs=='Second re-export')].inner.import.id" $color_struct_id
|
||||||
// @is "$.index[*][?(@.docs=='Second re-export')].inner.import.name" \"Colour\"
|
//@ is "$.index[*][?(@.docs=='Second re-export')].inner.import.name" \"Colour\"
|
||||||
// @set colour_export_id = "$.index[*][?(@.docs=='Second re-export')].id"
|
//@ set colour_export_id = "$.index[*][?(@.docs=='Second re-export')].id"
|
||||||
/// Second re-export
|
/// Second re-export
|
||||||
pub use style::Color as Colour;
|
pub use style::Color as Colour;
|
||||||
|
|
||||||
// @ismany "$.index[*][?(@.name=='private_two_names')].inner.module.items[*]" $color_export_id $colour_export_id
|
//@ ismany "$.index[*][?(@.name=='private_two_names')].inner.module.items[*]" $color_export_id $colour_export_id
|
||||||
|
|
|
@ -9,5 +9,5 @@ mod repeat_n {
|
||||||
/// not here
|
/// not here
|
||||||
pub use repeat_n::RepeatN;
|
pub use repeat_n::RepeatN;
|
||||||
|
|
||||||
// @count "$.index[*][?(@.name=='pub_use_doc_hidden')].inner.items[*]" 0
|
//@ count "$.index[*][?(@.name=='pub_use_doc_hidden')].inner.items[*]" 0
|
||||||
// @!has "$.index[*][?(@.docs == 'not here')]"
|
//@ !has "$.index[*][?(@.docs == 'not here')]"
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
// Regression test for <https://github.com/rust-lang/rust/issues/102583>.
|
// Regression test for <https://github.com/rust-lang/rust/issues/102583>.
|
||||||
|
|
||||||
// @set impl_S = "$.index[*][?(@.docs=='impl S')].id"
|
//@ set impl_S = "$.index[*][?(@.docs=='impl S')].id"
|
||||||
// @has "$.index[*][?(@.name=='S')].inner.struct.impls[*]" $impl_S
|
//@ has "$.index[*][?(@.name=='S')].inner.struct.impls[*]" $impl_S
|
||||||
// @set is_present = "$.index[*][?(@.name=='is_present')].id"
|
//@ set is_present = "$.index[*][?(@.name=='is_present')].id"
|
||||||
// @is "$.index[*][?(@.docs=='impl S')].inner.impl.items[*]" $is_present
|
//@ is "$.index[*][?(@.docs=='impl S')].inner.impl.items[*]" $is_present
|
||||||
// @!has "$.index[*][?(@.name=='hidden_impl')]"
|
//@ !has "$.index[*][?(@.name=='hidden_impl')]"
|
||||||
// @!has "$.index[*][?(@.name=='hidden_fn')]"
|
//@ !has "$.index[*][?(@.name=='hidden_fn')]"
|
||||||
|
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
//@ compile-flags: --document-hidden-items
|
//@ compile-flags: --document-hidden-items
|
||||||
|
|
||||||
// @has "$.index[*].inner[?(@.import.name=='UsedHidden')]"
|
//@ has "$.index[*].inner[?(@.import.name=='UsedHidden')]"
|
||||||
// @has "$.index[*][?(@.name=='Hidden')]"
|
//@ has "$.index[*][?(@.name=='Hidden')]"
|
||||||
pub mod submodule {
|
pub mod submodule {
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub struct Hidden {}
|
pub struct Hidden {}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
//@ edition:2018
|
//@ edition:2018
|
||||||
|
|
||||||
// @!has "$.index[*][?(@.name=='inner')]"
|
//@ !has "$.index[*][?(@.name=='inner')]"
|
||||||
mod inner {
|
mod inner {
|
||||||
// @has "$.index[*][?(@.name=='Public')]"
|
//@ has "$.index[*][?(@.name=='Public')]"
|
||||||
pub struct Public;
|
pub struct Public;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.inner.import)].inner.import.name" \"NewName\"
|
//@ is "$.index[*][?(@.inner.import)].inner.import.name" \"NewName\"
|
||||||
pub use inner::Public as NewName;
|
pub use inner::Public as NewName;
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
//@ edition:2018
|
//@ edition:2018
|
||||||
|
|
||||||
// @set inner_id = "$.index[*][?(@.name=='inner')].id"
|
//@ set inner_id = "$.index[*][?(@.name=='inner')].id"
|
||||||
pub mod inner {
|
pub mod inner {
|
||||||
// @set public_id = "$.index[*][?(@.name=='Public')].id"
|
//@ set public_id = "$.index[*][?(@.name=='Public')].id"
|
||||||
// @ismany "$.index[*][?(@.name=='inner')].inner.module.items[*]" $public_id
|
//@ ismany "$.index[*][?(@.name=='inner')].inner.module.items[*]" $public_id
|
||||||
pub struct Public;
|
pub struct Public;
|
||||||
}
|
}
|
||||||
// @set import_id = "$.index[*][?(@.docs=='Re-export')].id"
|
//@ set import_id = "$.index[*][?(@.docs=='Re-export')].id"
|
||||||
// @!has "$.index[*].inner[?(@.import.name=='Public')]"
|
//@ !has "$.index[*].inner[?(@.import.name=='Public')]"
|
||||||
// @is "$.index[*].inner[?(@.import.name=='NewName')].import.source" \"inner::Public\"
|
//@ is "$.index[*].inner[?(@.import.name=='NewName')].import.source" \"inner::Public\"
|
||||||
/// Re-export
|
/// Re-export
|
||||||
pub use inner::Public as NewName;
|
pub use inner::Public as NewName;
|
||||||
|
|
||||||
// @ismany "$.index[*][?(@.name=='rename_public')].inner.module.items[*]" $inner_id $import_id
|
//@ ismany "$.index[*][?(@.name=='rename_public')].inner.module.items[*]" $inner_id $import_id
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
// Regression test for <https://github.com/rust-lang/rust/issues/107677>.
|
// Regression test for <https://github.com/rust-lang/rust/issues/107677>.
|
||||||
|
|
||||||
pub mod nested {
|
pub mod nested {
|
||||||
// @set foo_struct = "$.index[*][?(@.docs == 'Foo the struct')].id"
|
//@ set foo_struct = "$.index[*][?(@.docs == 'Foo the struct')].id"
|
||||||
|
|
||||||
/// Foo the struct
|
/// Foo the struct
|
||||||
pub struct Foo {}
|
pub struct Foo {}
|
||||||
|
|
||||||
// @set foo_fn = "$.index[*][?(@.docs == 'Foo the function')].id"
|
//@ set foo_fn = "$.index[*][?(@.docs == 'Foo the function')].id"
|
||||||
|
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case)]
|
||||||
/// Foo the function
|
/// Foo the function
|
||||||
pub fn Foo() {}
|
pub fn Foo() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ismany "$.index[*].inner[?(@.import.name == 'Foo')].import.id" $foo_fn $foo_struct
|
//@ ismany "$.index[*].inner[?(@.import.name == 'Foo')].import.id" $foo_fn $foo_struct
|
||||||
// @ismany "$.index[*].inner[?(@.import.name == 'Bar')].import.id" $foo_fn $foo_struct
|
//@ ismany "$.index[*].inner[?(@.import.name == 'Bar')].import.id" $foo_fn $foo_struct
|
||||||
|
|
||||||
// @count "$.index[*].inner[?(@.import.name == 'Foo')]" 2
|
//@ count "$.index[*].inner[?(@.import.name == 'Foo')]" 2
|
||||||
pub use nested::Foo;
|
pub use nested::Foo;
|
||||||
// @count "$.index[*].inner[?(@.import.name == 'Bar')]" 2
|
//@ count "$.index[*].inner[?(@.import.name == 'Bar')]" 2
|
||||||
pub use Foo as Bar;
|
pub use Foo as Bar;
|
||||||
|
|
|
@ -5,17 +5,17 @@
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
||||||
mod inner {
|
mod inner {
|
||||||
// @set trait_id = "$.index[*][?(@.name=='Trait')].id"
|
//@ set trait_id = "$.index[*][?(@.name=='Trait')].id"
|
||||||
pub trait Trait {}
|
pub trait Trait {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// @set export_id = "$.index[*][?(@.docs=='First re-export')].id"
|
//@ set export_id = "$.index[*][?(@.docs=='First re-export')].id"
|
||||||
// @is "$.index[*].inner[?(@.import.name=='Trait')].import.id" $trait_id
|
//@ is "$.index[*].inner[?(@.import.name=='Trait')].import.id" $trait_id
|
||||||
/// First re-export
|
/// First re-export
|
||||||
pub use inner::Trait;
|
pub use inner::Trait;
|
||||||
// @set reexport_id = "$.index[*][?(@.docs=='Second re-export')].id"
|
//@ set reexport_id = "$.index[*][?(@.docs=='Second re-export')].id"
|
||||||
// @is "$.index[*].inner[?(@.import.name=='Reexport')].import.id" $trait_id
|
//@ is "$.index[*].inner[?(@.import.name=='Reexport')].import.id" $trait_id
|
||||||
/// Second re-export
|
/// Second re-export
|
||||||
pub use inner::Trait as Reexport;
|
pub use inner::Trait as Reexport;
|
||||||
|
|
||||||
// @ismany "$.index[*][?(@.name=='same_type_reexported_more_than_once')].inner.module.items[*]" $reexport_id $export_id
|
//@ ismany "$.index[*][?(@.name=='same_type_reexported_more_than_once')].inner.module.items[*]" $reexport_id $export_id
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
//@ edition:2018
|
//@ edition:2018
|
||||||
|
|
||||||
// @!has "$.index[*][?(@.name=='inner')]"
|
//@ !has "$.index[*][?(@.name=='inner')]"
|
||||||
mod inner {
|
mod inner {
|
||||||
// @set pub_id = "$.index[*][?(@.name=='Public')].id"
|
//@ set pub_id = "$.index[*][?(@.name=='Public')].id"
|
||||||
pub struct Public;
|
pub struct Public;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @is "$.index[*][?(@.inner.import)].inner.import.name" \"Public\"
|
//@ is "$.index[*][?(@.inner.import)].inner.import.name" \"Public\"
|
||||||
// @is "$.index[*][?(@.inner.import)].inner.import.id" $pub_id
|
//@ is "$.index[*][?(@.inner.import)].inner.import.id" $pub_id
|
||||||
// @set use_id = "$.index[*][?(@.inner.import)].id"
|
//@ set use_id = "$.index[*][?(@.inner.import)].id"
|
||||||
pub use inner::Public;
|
pub use inner::Public;
|
||||||
|
|
||||||
// @ismany "$.index[*][?(@.name=='simple_private')].inner.module.items[*]" $use_id
|
//@ ismany "$.index[*][?(@.name=='simple_private')].inner.module.items[*]" $use_id
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
//@ edition:2018
|
//@ edition:2018
|
||||||
|
|
||||||
// @set inner_id = "$.index[*][?(@.name=='inner')].id"
|
//@ set inner_id = "$.index[*][?(@.name=='inner')].id"
|
||||||
pub mod inner {
|
pub mod inner {
|
||||||
|
|
||||||
// @set public_id = "$.index[*][?(@.name=='Public')].id"
|
//@ set public_id = "$.index[*][?(@.name=='Public')].id"
|
||||||
// @ismany "$.index[*][?(@.name=='inner')].inner.module.items[*]" $public_id
|
//@ ismany "$.index[*][?(@.name=='inner')].inner.module.items[*]" $public_id
|
||||||
pub struct Public;
|
pub struct Public;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @set import_id = "$.index[*][?(@.docs=='Outer')].id"
|
//@ set import_id = "$.index[*][?(@.docs=='Outer')].id"
|
||||||
// @is "$.index[*][?(@.docs=='Outer')].inner.import.source" \"inner::Public\"
|
//@ is "$.index[*][?(@.docs=='Outer')].inner.import.source" \"inner::Public\"
|
||||||
/// Outer
|
/// Outer
|
||||||
pub use inner::Public;
|
pub use inner::Public;
|
||||||
|
|
||||||
// @ismany "$.index[*][?(@.name=='simple_public')].inner.module.items[*]" $import_id $inner_id
|
//@ ismany "$.index[*][?(@.name=='simple_public')].inner.module.items[*]" $import_id $inner_id
|
||||||
|
|
|
@ -7,4 +7,4 @@ pub struct Local;
|
||||||
|
|
||||||
impl trait_with_docs::HasDocs for Local {}
|
impl trait_with_docs::HasDocs for Local {}
|
||||||
|
|
||||||
// @!has "$.index[*][?(@.name == 'HasDocs')]"
|
//@ !has "$.index[*][?(@.name == 'HasDocs')]"
|
||||||
|
|
|
@ -5,8 +5,8 @@ mod secret {
|
||||||
pub struct Secret;
|
pub struct Secret;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @has "$.index[*][?(@.name=='get_secret')].inner.function"
|
//@ has "$.index[*][?(@.name=='get_secret')].inner.function"
|
||||||
// @is "$.index[*][?(@.name=='get_secret')].inner.function.decl.output.resolved_path.name" \"secret::Secret\"
|
//@ is "$.index[*][?(@.name=='get_secret')].inner.function.decl.output.resolved_path.name" \"secret::Secret\"
|
||||||
pub fn get_secret() -> secret::Secret {
|
pub fn get_secret() -> secret::Secret {
|
||||||
secret::Secret
|
secret::Secret
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
// @!has "$.index[*][?(@.name=='no_pub_inner')]"
|
//@ !has "$.index[*][?(@.name=='no_pub_inner')]"
|
||||||
mod no_pub_inner {
|
mod no_pub_inner {
|
||||||
fn priv_inner() {}
|
fn priv_inner() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// @!has "$.index[*][?(@.name=='pub_inner_unreachable')]"
|
//@ !has "$.index[*][?(@.name=='pub_inner_unreachable')]"
|
||||||
mod pub_inner_unreachable {
|
mod pub_inner_unreachable {
|
||||||
// @!has "$.index[*][?(@.name=='pub_inner_1')]"
|
//@ !has "$.index[*][?(@.name=='pub_inner_1')]"
|
||||||
pub fn pub_inner_1() {}
|
pub fn pub_inner_1() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// @!has "$.index[*][?(@.name=='pub_inner_reachable')]"
|
//@ !has "$.index[*][?(@.name=='pub_inner_reachable')]"
|
||||||
mod pub_inner_reachable {
|
mod pub_inner_reachable {
|
||||||
// @has "$.index[*][?(@.name=='pub_inner_2')]"
|
//@ has "$.index[*][?(@.name=='pub_inner_2')]"
|
||||||
pub fn pub_inner_2() {}
|
pub fn pub_inner_2() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,24 +15,24 @@ pub struct Foo {
|
||||||
pub vll_9: i32,
|
pub vll_9: i32,
|
||||||
}
|
}
|
||||||
|
|
||||||
// @set 0 = '$.index[*][?(@.name == "ews_0")].id'
|
//@ set 0 = '$.index[*][?(@.name == "ews_0")].id'
|
||||||
// @set 1 = '$.index[*][?(@.name == "dik_1")].id'
|
//@ set 1 = '$.index[*][?(@.name == "dik_1")].id'
|
||||||
// @set 2 = '$.index[*][?(@.name == "hsk_2")].id'
|
//@ set 2 = '$.index[*][?(@.name == "hsk_2")].id'
|
||||||
// @set 3 = '$.index[*][?(@.name == "djt_3")].id'
|
//@ set 3 = '$.index[*][?(@.name == "djt_3")].id'
|
||||||
// @set 4 = '$.index[*][?(@.name == "jnr_4")].id'
|
//@ set 4 = '$.index[*][?(@.name == "jnr_4")].id'
|
||||||
// @set 5 = '$.index[*][?(@.name == "dfs_5")].id'
|
//@ set 5 = '$.index[*][?(@.name == "dfs_5")].id'
|
||||||
// @set 6 = '$.index[*][?(@.name == "bja_6")].id'
|
//@ set 6 = '$.index[*][?(@.name == "bja_6")].id'
|
||||||
// @set 7 = '$.index[*][?(@.name == "lyc_7")].id'
|
//@ set 7 = '$.index[*][?(@.name == "lyc_7")].id'
|
||||||
// @set 8 = '$.index[*][?(@.name == "yqd_8")].id'
|
//@ set 8 = '$.index[*][?(@.name == "yqd_8")].id'
|
||||||
// @set 9 = '$.index[*][?(@.name == "vll_9")].id'
|
//@ set 9 = '$.index[*][?(@.name == "vll_9")].id'
|
||||||
|
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.struct.kind.plain.fields[0]' $0
|
//@ is '$.index[*][?(@.name == "Foo")].inner.struct.kind.plain.fields[0]' $0
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.struct.kind.plain.fields[1]' $1
|
//@ is '$.index[*][?(@.name == "Foo")].inner.struct.kind.plain.fields[1]' $1
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.struct.kind.plain.fields[2]' $2
|
//@ is '$.index[*][?(@.name == "Foo")].inner.struct.kind.plain.fields[2]' $2
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.struct.kind.plain.fields[3]' $3
|
//@ is '$.index[*][?(@.name == "Foo")].inner.struct.kind.plain.fields[3]' $3
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.struct.kind.plain.fields[4]' $4
|
//@ is '$.index[*][?(@.name == "Foo")].inner.struct.kind.plain.fields[4]' $4
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.struct.kind.plain.fields[5]' $5
|
//@ is '$.index[*][?(@.name == "Foo")].inner.struct.kind.plain.fields[5]' $5
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.struct.kind.plain.fields[6]' $6
|
//@ is '$.index[*][?(@.name == "Foo")].inner.struct.kind.plain.fields[6]' $6
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.struct.kind.plain.fields[7]' $7
|
//@ is '$.index[*][?(@.name == "Foo")].inner.struct.kind.plain.fields[7]' $7
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.struct.kind.plain.fields[8]' $8
|
//@ is '$.index[*][?(@.name == "Foo")].inner.struct.kind.plain.fields[8]' $8
|
||||||
// @is '$.index[*][?(@.name == "Foo")].inner.struct.kind.plain.fields[9]' $9
|
//@ is '$.index[*][?(@.name == "Foo")].inner.struct.kind.plain.fields[9]' $9
|
||||||
|
|
|
@ -3,9 +3,9 @@ pub struct Demo {
|
||||||
pub y: i32,
|
pub y: i32,
|
||||||
}
|
}
|
||||||
|
|
||||||
// @set x = "$.index[*][?(@.name=='x')].id"
|
//@ set x = "$.index[*][?(@.name=='x')].id"
|
||||||
// @set y = "$.index[*][?(@.name=='y')].id"
|
//@ set y = "$.index[*][?(@.name=='y')].id"
|
||||||
// @is "$.index[*][?(@.name=='Demo')].inner.struct.kind.plain.fields[0]" $x
|
//@ is "$.index[*][?(@.name=='Demo')].inner.struct.kind.plain.fields[0]" $x
|
||||||
// @is "$.index[*][?(@.name=='Demo')].inner.struct.kind.plain.fields[1]" $y
|
//@ is "$.index[*][?(@.name=='Demo')].inner.struct.kind.plain.fields[1]" $y
|
||||||
// @count "$.index[*][?(@.name=='Demo')].inner.struct.kind.plain.fields[*]" 2
|
//@ count "$.index[*][?(@.name=='Demo')].inner.struct.kind.plain.fields[*]" 2
|
||||||
// @is "$.index[*][?(@.name=='Demo')].inner.struct.kind.plain.fields_stripped" false
|
//@ is "$.index[*][?(@.name=='Demo')].inner.struct.kind.plain.fields_stripped" false
|
||||||
|
|
|
@ -4,8 +4,8 @@ pub struct Demo {
|
||||||
pub y: i32,
|
pub y: i32,
|
||||||
}
|
}
|
||||||
|
|
||||||
// @set x = "$.index[*][?(@.name=='x')].id"
|
//@ set x = "$.index[*][?(@.name=='x')].id"
|
||||||
// @!has "$.index[*][?(@.name=='y')].id"
|
//@ !has "$.index[*][?(@.name=='y')].id"
|
||||||
// @is "$.index[*][?(@.name=='Demo')].inner.struct.kind.plain.fields[0]" $x
|
//@ is "$.index[*][?(@.name=='Demo')].inner.struct.kind.plain.fields[0]" $x
|
||||||
// @count "$.index[*][?(@.name=='Demo')].inner.struct.kind.plain.fields[*]" 1
|
//@ count "$.index[*][?(@.name=='Demo')].inner.struct.kind.plain.fields[*]" 1
|
||||||
// @is "$.index[*][?(@.name=='Demo')].inner.struct.kind.plain.fields_stripped" true
|
//@ is "$.index[*][?(@.name=='Demo')].inner.struct.kind.plain.fields_stripped" true
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue