Skip to content
/ rust Public
forked from rust-lang/rust

Commit 7ab71c4

Browse files
committed
tests/rustdoc-json: replace $.index[*][? with $.index[?
Done automatically with VSCode.
1 parent a0918b7 commit 7ab71c4

File tree

151 files changed

+1155
-1155
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+1155
-1155
lines changed

tests/rustdoc-json/assoc_items.rs

+12-12
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,32 @@
33
pub struct Simple;
44

55
impl Simple {
6-
//@ has "$.index[*][?(@.name=='CONSTANT')].inner.assoc_const"
6+
//@ has "$.index[?(@.name=='CONSTANT')].inner.assoc_const"
77
pub const CONSTANT: usize = 0;
88
}
99

1010
pub trait EasyToImpl {
11-
//@ has "$.index[*][?(@.docs=='ToDeclare trait')].inner.assoc_type"
12-
//@ is "$.index[*][?(@.docs=='ToDeclare trait')].inner.assoc_type.type" null
13-
//@ is "$.index[*][?(@.docs=='ToDeclare trait')].inner.assoc_type.bounds" []
11+
//@ has "$.index[?(@.docs=='ToDeclare trait')].inner.assoc_type"
12+
//@ is "$.index[?(@.docs=='ToDeclare trait')].inner.assoc_type.type" null
13+
//@ is "$.index[?(@.docs=='ToDeclare trait')].inner.assoc_type.bounds" []
1414
/// ToDeclare trait
1515
type ToDeclare;
16-
//@ has "$.index[*][?(@.docs=='AN_ATTRIBUTE trait')].inner.assoc_const"
17-
//@ is "$.index[*][?(@.docs=='AN_ATTRIBUTE trait')].inner.assoc_const.value" null
18-
//@ is "$.index[*][?(@.docs=='AN_ATTRIBUTE trait')].inner.assoc_const.type.primitive" '"usize"'
16+
//@ has "$.index[?(@.docs=='AN_ATTRIBUTE trait')].inner.assoc_const"
17+
//@ is "$.index[?(@.docs=='AN_ATTRIBUTE trait')].inner.assoc_const.value" null
18+
//@ is "$.index[?(@.docs=='AN_ATTRIBUTE trait')].inner.assoc_const.type.primitive" '"usize"'
1919
/// AN_ATTRIBUTE trait
2020
const AN_ATTRIBUTE: usize;
2121
}
2222

2323
impl EasyToImpl for Simple {
24-
//@ has "$.index[*][?(@.docs=='ToDeclare impl')].inner.assoc_type"
25-
//@ is "$.index[*][?(@.docs=='ToDeclare impl')].inner.assoc_type.type.primitive" \"usize\"
24+
//@ has "$.index[?(@.docs=='ToDeclare impl')].inner.assoc_type"
25+
//@ is "$.index[?(@.docs=='ToDeclare impl')].inner.assoc_type.type.primitive" \"usize\"
2626
/// ToDeclare impl
2727
type ToDeclare = usize;
2828

29-
//@ has "$.index[*][?(@.docs=='AN_ATTRIBUTE impl')].inner.assoc_const"
30-
//@ is "$.index[*][?(@.docs=='AN_ATTRIBUTE impl')].inner.assoc_const.type.primitive" \"usize\"
31-
//@ is "$.index[*][?(@.docs=='AN_ATTRIBUTE impl')].inner.assoc_const.value" \"12\"
29+
//@ has "$.index[?(@.docs=='AN_ATTRIBUTE impl')].inner.assoc_const"
30+
//@ is "$.index[?(@.docs=='AN_ATTRIBUTE impl')].inner.assoc_const.type.primitive" \"usize\"
31+
//@ is "$.index[?(@.docs=='AN_ATTRIBUTE impl')].inner.assoc_const.value" \"12\"
3232
/// AN_ATTRIBUTE impl
3333
const AN_ATTRIBUTE: usize = 12;
3434
}

tests/rustdoc-json/assoc_type.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// Regression test for <https://github.com/rust-lang/rust/issues/98547>.
22

3-
//@ has "$.index[*][?(@.name=='Trait')]"
4-
//@ has "$.index[*][?(@.name=='AssocType')]"
5-
//@ has "$.index[*][?(@.name=='S')]"
6-
//@ has "$.index[*][?(@.name=='S2')]"
3+
//@ has "$.index[?(@.name=='Trait')]"
4+
//@ has "$.index[?(@.name=='AssocType')]"
5+
//@ has "$.index[?(@.name=='S')]"
6+
//@ has "$.index[?(@.name=='S2')]"
77

88
pub trait Trait {
99
type AssocType;
+16-16
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
1-
//@ is "$.index[*][?(@.name=='not')].attrs" []
2-
//@ is "$.index[*][?(@.name=='not')].deprecation" null
1+
//@ is "$.index[?(@.name=='not')].attrs" []
2+
//@ is "$.index[?(@.name=='not')].deprecation" null
33
pub fn not() {}
44

5-
//@ is "$.index[*][?(@.name=='raw')].attrs" []
6-
//@ is "$.index[*][?(@.name=='raw')].deprecation" '{"since": null, "note": null}'
5+
//@ is "$.index[?(@.name=='raw')].attrs" []
6+
//@ is "$.index[?(@.name=='raw')].deprecation" '{"since": null, "note": null}'
77
#[deprecated]
88
pub fn raw() {}
99

10-
//@ is "$.index[*][?(@.name=='equals_string')].attrs" []
11-
//@ is "$.index[*][?(@.name=='equals_string')].deprecation" '{"since": null, "note": "here is a reason"}'
10+
//@ is "$.index[?(@.name=='equals_string')].attrs" []
11+
//@ is "$.index[?(@.name=='equals_string')].deprecation" '{"since": null, "note": "here is a reason"}'
1212
#[deprecated = "here is a reason"]
1313
pub fn equals_string() {}
1414

15-
//@ is "$.index[*][?(@.name=='since')].attrs" []
16-
//@ is "$.index[*][?(@.name=='since')].deprecation" '{"since": "yoinks ago", "note": null}'
15+
//@ is "$.index[?(@.name=='since')].attrs" []
16+
//@ is "$.index[?(@.name=='since')].deprecation" '{"since": "yoinks ago", "note": null}'
1717
#[deprecated(since = "yoinks ago")]
1818
pub fn since() {}
1919

20-
//@ is "$.index[*][?(@.name=='note')].attrs" []
21-
//@ is "$.index[*][?(@.name=='note')].deprecation" '{"since": null, "note": "7"}'
20+
//@ is "$.index[?(@.name=='note')].attrs" []
21+
//@ is "$.index[?(@.name=='note')].deprecation" '{"since": null, "note": "7"}'
2222
#[deprecated(note = "7")]
2323
pub fn note() {}
2424

25-
//@ is "$.index[*][?(@.name=='since_and_note')].attrs" []
26-
//@ is "$.index[*][?(@.name=='since_and_note')].deprecation" '{"since": "tomorrow", "note": "sorry"}'
25+
//@ is "$.index[?(@.name=='since_and_note')].attrs" []
26+
//@ is "$.index[?(@.name=='since_and_note')].deprecation" '{"since": "tomorrow", "note": "sorry"}'
2727
#[deprecated(since = "tomorrow", note = "sorry")]
2828
pub fn since_and_note() {}
2929

30-
//@ is "$.index[*][?(@.name=='note_and_since')].attrs" []
31-
//@ is "$.index[*][?(@.name=='note_and_since')].deprecation" '{"since": "a year from tomorrow", "note": "your welcome"}'
30+
//@ is "$.index[?(@.name=='note_and_since')].attrs" []
31+
//@ is "$.index[?(@.name=='note_and_since')].deprecation" '{"since": "a year from tomorrow", "note": "your welcome"}'
3232
#[deprecated(note = "your welcome", since = "a year from tomorrow")]
3333
pub fn note_and_since() {}
3434

35-
//@ is "$.index[*][?(@.name=='neither_but_parens')].attrs" []
36-
//@ is "$.index[*][?(@.name=='neither_but_parens')].deprecation" '{"since": null, "note": null}'
35+
//@ is "$.index[?(@.name=='neither_but_parens')].attrs" []
36+
//@ is "$.index[?(@.name=='neither_but_parens')].deprecation" '{"since": null, "note": null}'
3737
#[deprecated()]
3838
pub fn neither_but_parens() {}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ edition: 2021
22
#![no_std]
33

4-
//@ is "$.index[*][?(@.name=='example')].attrs" '["#[export_name = \"altered\"]"]'
4+
//@ is "$.index[?(@.name=='example')].attrs" '["#[export_name = \"altered\"]"]'
55
#[export_name = "altered"]
66
pub extern "C" fn example() {}

tests/rustdoc-json/attrs/export_name_2024.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
// The representation of `#[unsafe(export_name = ..)]` in rustdoc in edition 2024
55
// is still `#[export_name = ..]` without the `unsafe` attribute wrapper.
66

7-
//@ is "$.index[*][?(@.name=='example')].attrs" '["#[export_name = \"altered\"]"]'
7+
//@ is "$.index[?(@.name=='example')].attrs" '["#[export_name = \"altered\"]"]'
88
#[unsafe(export_name = "altered")]
99
pub extern "C" fn example() {}

tests/rustdoc-json/attrs/must_use.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#![no_std]
22

3-
//@ is "$.index[*][?(@.name=='example')].attrs" '["#[must_use]"]'
3+
//@ is "$.index[?(@.name=='example')].attrs" '["#[must_use]"]'
44
#[must_use]
55
pub fn example() -> impl Iterator<Item = i64> {}
66

7-
//@ is "$.index[*][?(@.name=='explicit_message')].attrs" '["#[must_use = \"does nothing if you do not use it\"]"]'
7+
//@ is "$.index[?(@.name=='explicit_message')].attrs" '["#[must_use = \"does nothing if you do not use it\"]"]'
88
#[must_use = "does nothing if you do not use it"]
99
pub fn explicit_message() -> impl Iterator<Item = i64> {}
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ edition: 2021
22
#![no_std]
33

4-
//@ is "$.index[*][?(@.name=='example')].attrs" '["#[no_mangle]"]'
4+
//@ is "$.index[?(@.name=='example')].attrs" '["#[no_mangle]"]'
55
#[no_mangle]
66
pub extern "C" fn example() {}

tests/rustdoc-json/attrs/no_mangle_2024.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
// The representation of `#[unsafe(no_mangle)]` in rustdoc in edition 2024
55
// is still `#[no_mangle]` without the `unsafe` attribute wrapper.
66

7-
//@ is "$.index[*][?(@.name=='example')].attrs" '["#[no_mangle]"]'
7+
//@ is "$.index[?(@.name=='example')].attrs" '["#[no_mangle]"]'
88
#[unsafe(no_mangle)]
99
pub extern "C" fn example() {}

tests/rustdoc-json/attrs/non_exhaustive.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
#![no_std]
22

3-
//@ is "$.index[*][?(@.name=='MyEnum')].attrs" '["#[non_exhaustive]"]'
3+
//@ is "$.index[?(@.name=='MyEnum')].attrs" '["#[non_exhaustive]"]'
44
#[non_exhaustive]
55
pub enum MyEnum {
66
First,
77
}
88

99
pub enum NonExhaustiveVariant {
10-
//@ is "$.index[*][?(@.name=='Variant')].attrs" '["#[non_exhaustive]"]'
10+
//@ is "$.index[?(@.name=='Variant')].attrs" '["#[non_exhaustive]"]'
1111
#[non_exhaustive]
1212
Variant(i64),
1313
}
1414

15-
//@ is "$.index[*][?(@.name=='MyStruct')].attrs" '["#[non_exhaustive]"]'
15+
//@ is "$.index[?(@.name=='MyStruct')].attrs" '["#[non_exhaustive]"]'
1616
#[non_exhaustive]
1717
pub struct MyStruct {
1818
pub x: i64,

tests/rustdoc-json/attrs/repr_align.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![no_std]
22

3-
//@ is "$.index[*][?(@.name=='Aligned')].attrs" '["#[attr = Repr([ReprAlign(Align(4 bytes))])]\n"]'
3+
//@ is "$.index[?(@.name=='Aligned')].attrs" '["#[attr = Repr([ReprAlign(Align(4 bytes))])]\n"]'
44
#[repr(align(4))]
55
pub struct Aligned {
66
a: i8,

tests/rustdoc-json/attrs/repr_c.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
#![no_std]
22

3-
//@ is "$.index[*][?(@.name=='ReprCStruct')].attrs" '["#[attr = Repr([ReprC])]\n"]'
3+
//@ is "$.index[?(@.name=='ReprCStruct')].attrs" '["#[attr = Repr([ReprC])]\n"]'
44
#[repr(C)]
55
pub struct ReprCStruct(pub i64);
66

7-
//@ is "$.index[*][?(@.name=='ReprCEnum')].attrs" '["#[attr = Repr([ReprC])]\n"]'
7+
//@ is "$.index[?(@.name=='ReprCEnum')].attrs" '["#[attr = Repr([ReprC])]\n"]'
88
#[repr(C)]
99
pub enum ReprCEnum {
1010
First,
1111
}
1212

13-
//@ is "$.index[*][?(@.name=='ReprCUnion')].attrs" '["#[attr = Repr([ReprC])]\n"]'
13+
//@ is "$.index[?(@.name=='ReprCUnion')].attrs" '["#[attr = Repr([ReprC])]\n"]'
1414
#[repr(C)]
1515
pub union ReprCUnion {
1616
pub left: i64,

tests/rustdoc-json/attrs/repr_combination.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -2,76 +2,76 @@
22

33
// Combinations of `#[repr(..)]` attributes.
44

5-
//@ is "$.index[*][?(@.name=='ReprCI8')].attrs" '["#[attr = Repr([ReprC, ReprInt(SignedInt(I8))])]\n"]'
5+
//@ is "$.index[?(@.name=='ReprCI8')].attrs" '["#[attr = Repr([ReprC, ReprInt(SignedInt(I8))])]\n"]'
66
#[repr(C, i8)]
77
pub enum ReprCI8 {
88
First,
99
}
1010

11-
//@ is "$.index[*][?(@.name=='SeparateReprCI16')].attrs" '["#[attr = Repr([ReprC, ReprInt(SignedInt(I16))])]\n"]'
11+
//@ is "$.index[?(@.name=='SeparateReprCI16')].attrs" '["#[attr = Repr([ReprC, ReprInt(SignedInt(I16))])]\n"]'
1212
#[repr(C)]
1313
#[repr(i16)]
1414
pub enum SeparateReprCI16 {
1515
First,
1616
}
1717

18-
//@ is "$.index[*][?(@.name=='ReversedReprCUsize')].attrs" '["#[attr = Repr([ReprInt(UnsignedInt(Usize)), ReprC])]\n"]'
18+
//@ is "$.index[?(@.name=='ReversedReprCUsize')].attrs" '["#[attr = Repr([ReprInt(UnsignedInt(Usize)), ReprC])]\n"]'
1919
#[repr(usize, C)]
2020
pub enum ReversedReprCUsize {
2121
First,
2222
}
2323

24-
//@ is "$.index[*][?(@.name=='ReprCPacked')].attrs" '["#[attr = Repr([ReprC, ReprPacked(Align(1 bytes))])]\n"]'
24+
//@ is "$.index[?(@.name=='ReprCPacked')].attrs" '["#[attr = Repr([ReprC, ReprPacked(Align(1 bytes))])]\n"]'
2525
#[repr(C, packed)]
2626
pub struct ReprCPacked {
2727
a: i8,
2828
b: i64,
2929
}
3030

31-
//@ is "$.index[*][?(@.name=='SeparateReprCPacked')].attrs" '["#[attr = Repr([ReprC, ReprPacked(Align(2 bytes))])]\n"]'
31+
//@ is "$.index[?(@.name=='SeparateReprCPacked')].attrs" '["#[attr = Repr([ReprC, ReprPacked(Align(2 bytes))])]\n"]'
3232
#[repr(C)]
3333
#[repr(packed(2))]
3434
pub struct SeparateReprCPacked {
3535
a: i8,
3636
b: i64,
3737
}
3838

39-
//@ is "$.index[*][?(@.name=='ReversedReprCPacked')].attrs" '["#[attr = Repr([ReprPacked(Align(2 bytes)), ReprC])]\n"]'
39+
//@ is "$.index[?(@.name=='ReversedReprCPacked')].attrs" '["#[attr = Repr([ReprPacked(Align(2 bytes)), ReprC])]\n"]'
4040
#[repr(packed(2), C)]
4141
pub struct ReversedReprCPacked {
4242
a: i8,
4343
b: i64,
4444
}
4545

46-
//@ is "$.index[*][?(@.name=='ReprCAlign')].attrs" '["#[attr = Repr([ReprC, ReprAlign(Align(16 bytes))])]\n"]'
46+
//@ is "$.index[?(@.name=='ReprCAlign')].attrs" '["#[attr = Repr([ReprC, ReprAlign(Align(16 bytes))])]\n"]'
4747
#[repr(C, align(16))]
4848
pub struct ReprCAlign {
4949
a: i8,
5050
b: i64,
5151
}
5252

53-
//@ is "$.index[*][?(@.name=='SeparateReprCAlign')].attrs" '["#[attr = Repr([ReprC, ReprAlign(Align(2 bytes))])]\n"]'
53+
//@ is "$.index[?(@.name=='SeparateReprCAlign')].attrs" '["#[attr = Repr([ReprC, ReprAlign(Align(2 bytes))])]\n"]'
5454
#[repr(C)]
5555
#[repr(align(2))]
5656
pub struct SeparateReprCAlign {
5757
a: i8,
5858
b: i64,
5959
}
6060

61-
//@ is "$.index[*][?(@.name=='ReversedReprCAlign')].attrs" '["#[attr = Repr([ReprAlign(Align(2 bytes)), ReprC])]\n"]'
61+
//@ is "$.index[?(@.name=='ReversedReprCAlign')].attrs" '["#[attr = Repr([ReprAlign(Align(2 bytes)), ReprC])]\n"]'
6262
#[repr(align(2), C)]
6363
pub struct ReversedReprCAlign {
6464
a: i8,
6565
b: i64,
6666
}
6767

68-
//@ is "$.index[*][?(@.name=='AlignedExplicitRepr')].attrs" '["#[attr = Repr([ReprC, ReprAlign(Align(16 bytes)), ReprInt(SignedInt(Isize))])]\n"]'
68+
//@ is "$.index[?(@.name=='AlignedExplicitRepr')].attrs" '["#[attr = Repr([ReprC, ReprAlign(Align(16 bytes)), ReprInt(SignedInt(Isize))])]\n"]'
6969
#[repr(C, align(16), isize)]
7070
pub enum AlignedExplicitRepr {
7171
First,
7272
}
7373

74-
//@ is "$.index[*][?(@.name=='ReorderedAlignedExplicitRepr')].attrs" '["#[attr = Repr([ReprInt(SignedInt(Isize)), ReprC, ReprAlign(Align(16 bytes))])]\n"]'
74+
//@ is "$.index[?(@.name=='ReorderedAlignedExplicitRepr')].attrs" '["#[attr = Repr([ReprInt(SignedInt(Isize)), ReprC, ReprAlign(Align(16 bytes))])]\n"]'
7575
#[repr(isize, C, align(16))]
7676
pub enum ReorderedAlignedExplicitRepr {
7777
First,

tests/rustdoc-json/attrs/repr_int_enum.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
#![no_std]
22

3-
//@ is "$.index[*][?(@.name=='I8')].attrs" '["#[attr = Repr([ReprInt(SignedInt(I8))])]\n"]'
3+
//@ is "$.index[?(@.name=='I8')].attrs" '["#[attr = Repr([ReprInt(SignedInt(I8))])]\n"]'
44
#[repr(i8)]
55
pub enum I8 {
66
First,
77
}
88

9-
//@ is "$.index[*][?(@.name=='I32')].attrs" '["#[attr = Repr([ReprInt(SignedInt(I32))])]\n"]'
9+
//@ is "$.index[?(@.name=='I32')].attrs" '["#[attr = Repr([ReprInt(SignedInt(I32))])]\n"]'
1010
#[repr(i32)]
1111
pub enum I32 {
1212
First,
1313
}
1414

15-
//@ is "$.index[*][?(@.name=='Usize')].attrs" '["#[attr = Repr([ReprInt(UnsignedInt(Usize))])]\n"]'
15+
//@ is "$.index[?(@.name=='Usize')].attrs" '["#[attr = Repr([ReprInt(UnsignedInt(Usize))])]\n"]'
1616
#[repr(usize)]
1717
pub enum Usize {
1818
First,

tests/rustdoc-json/attrs/repr_packed.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
// Note the normalization:
44
// `#[repr(packed)]` in has the implict "1" in rustdoc JSON.
55

6-
//@ is "$.index[*][?(@.name=='Packed')].attrs" '["#[attr = Repr([ReprPacked(Align(1 bytes))])]\n"]'
6+
//@ is "$.index[?(@.name=='Packed')].attrs" '["#[attr = Repr([ReprPacked(Align(1 bytes))])]\n"]'
77
#[repr(packed)]
88
pub struct Packed {
99
a: i8,
1010
b: i64,
1111
}
1212

13-
//@ is "$.index[*][?(@.name=='PackedAligned')].attrs" '["#[attr = Repr([ReprPacked(Align(4 bytes))])]\n"]'
13+
//@ is "$.index[?(@.name=='PackedAligned')].attrs" '["#[attr = Repr([ReprPacked(Align(4 bytes))])]\n"]'
1414
#[repr(packed(4))]
1515
pub struct PackedAligned {
1616
a: i8,

tests/rustdoc-json/attrs/repr_transparent.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55
//
66
// https://doc.rust-lang.org/nomicon/other-reprs.html#reprtransparent
77

8-
//@ is "$.index[*][?(@.name=='Transparent')].attrs" '["#[attr = Repr([ReprTransparent])]\n"]'
8+
//@ is "$.index[?(@.name=='Transparent')].attrs" '["#[attr = Repr([ReprTransparent])]\n"]'
99
#[repr(transparent)]
1010
pub struct Transparent(pub i64);
1111

12-
//@ is "$.index[*][?(@.name=='TransparentNonPub')].attrs" '["#[attr = Repr([ReprTransparent])]\n"]'
12+
//@ is "$.index[?(@.name=='TransparentNonPub')].attrs" '["#[attr = Repr([ReprTransparent])]\n"]'
1313
#[repr(transparent)]
1414
pub struct TransparentNonPub(i64);
1515

16-
//@ is "$.index[*][?(@.name=='AllZst')].attrs" '["#[attr = Repr([ReprTransparent])]\n"]'
16+
//@ is "$.index[?(@.name=='AllZst')].attrs" '["#[attr = Repr([ReprTransparent])]\n"]'
1717
#[repr(transparent)]
1818
pub struct AllZst<'a>(pub core::marker::PhantomData<&'a ()>, ());
1919

20-
//@ is "$.index[*][?(@.name=='AllZstNotPublic')].attrs" '["#[attr = Repr([ReprTransparent])]\n"]'
20+
//@ is "$.index[?(@.name=='AllZstNotPublic')].attrs" '["#[attr = Repr([ReprTransparent])]\n"]'
2121
#[repr(transparent)]
2222
pub struct AllZstNotPublic<'a>(core::marker::PhantomData<&'a ()>, ());

tests/rustdoc-json/blanket_impls.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#![no_std]
44

5-
//@ has "$.index[*][?(@.name=='Error')].inner.assoc_type"
6-
//@ has "$.index[*][?(@.name=='Error')].inner.assoc_type.type.resolved_path"
7-
//@ has "$.index[*][?(@.name=='Error')].inner.assoc_type.type.resolved_path.path" \"Infallible\"
5+
//@ has "$.index[?(@.name=='Error')].inner.assoc_type"
6+
//@ has "$.index[?(@.name=='Error')].inner.assoc_type.type.resolved_path"
7+
//@ has "$.index[?(@.name=='Error')].inner.assoc_type.type.resolved_path.path" \"Infallible\"
88
pub struct ForBlanketTryFromImpl;

tests/rustdoc-json/doc_hidden_failure.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ mod auto {
1111
}
1212
}
1313

14-
//@ count "$.index[*][?(@.name=='builders')]" 1
15-
//@ has "$.index[*][?(@.name == 'ActionRowBuilder')"]
14+
//@ count "$.index[?(@.name=='builders')]" 1
15+
//@ has "$.index[?(@.name == 'ActionRowBuilder')"]
1616
pub use auto::*;
1717

1818
pub mod builders {
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#[repr(i8)]
22
pub enum Ordering {
3-
//@ is "$.index[*][?(@.name=='Less')].inner.variant.discriminant.expr" '"-1"'
4-
//@ is "$.index[*][?(@.name=='Less')].inner.variant.discriminant.value" '"-1"'
3+
//@ is "$.index[?(@.name=='Less')].inner.variant.discriminant.expr" '"-1"'
4+
//@ is "$.index[?(@.name=='Less')].inner.variant.discriminant.value" '"-1"'
55
Less = -1,
6-
//@ is "$.index[*][?(@.name=='Equal')].inner.variant.discriminant.expr" '"0"'
7-
//@ is "$.index[*][?(@.name=='Equal')].inner.variant.discriminant.value" '"0"'
6+
//@ is "$.index[?(@.name=='Equal')].inner.variant.discriminant.expr" '"0"'
7+
//@ is "$.index[?(@.name=='Equal')].inner.variant.discriminant.value" '"0"'
88
Equal = 0,
9-
//@ is "$.index[*][?(@.name=='Greater')].inner.variant.discriminant.expr" '"1"'
10-
//@ is "$.index[*][?(@.name=='Greater')].inner.variant.discriminant.value" '"1"'
9+
//@ is "$.index[?(@.name=='Greater')].inner.variant.discriminant.expr" '"1"'
10+
//@ is "$.index[?(@.name=='Greater')].inner.variant.discriminant.value" '"1"'
1111
Greater = 1,
1212
}

0 commit comments

Comments
 (0)