File tree Expand file tree Collapse file tree 17 files changed +70
-41
lines changed Expand file tree Collapse file tree 17 files changed +70
-41
lines changed Original file line number Diff line number Diff line change @@ -9,5 +9,5 @@ impl Default for Manual {
9
9
}
10
10
}
11
11
12
- //@ is '$.index[?(@.inner.impl.for.resolved_path.path == "Derive" && @.inner.impl.trait.path == "Default")].attrs' '["#[ automatically_derived] "]'
12
+ //@ is '$.index[?(@.inner.impl.for.resolved_path.path == "Derive" && @.inner.impl.trait.path == "Default")].attrs' '["automatically_derived"]'
13
13
//@ is '$.index[?(@.inner.impl.for.resolved_path.path == "Manual" && @.inner.impl.trait.path == "Default")].attrs' '[]'
Original file line number Diff line number Diff line change 1
1
//@ edition: 2021
2
2
#![ no_std]
3
3
4
- //@ is "$.index[?(@.name=='example')].attrs" '["#[ export_name = \ "altered\"]" ]'
4
+ //@ is "$.index[?(@.name=='example')].attrs" '[{" export_name": "altered"} ]'
5
5
#[ export_name = "altered" ]
6
6
pub extern "C" fn example ( ) { }
Original file line number Diff line number Diff line change 2
2
#![ no_std]
3
3
4
4
// The representation of `#[unsafe(export_name = ..)]` in rustdoc in edition 2024
5
- // is still `#[export_name = ..]` without the `unsafe` attribute wrapper .
5
+ // doesn't mention the `unsafe`.
6
6
7
- //@ is "$.index[?(@.name=='example')].attrs" '["#[ export_name = \ "altered\"]" ]'
7
+ //@ is "$.index[?(@.name=='example')].attrs" '[{" export_name": "altered"} ]'
8
8
#[ unsafe( export_name = "altered" ) ]
9
9
pub extern "C" fn example ( ) { }
Original file line number Diff line number Diff line change 1
- //@ is "$.index[?(@.name=='just_inline')].attrs" '[" #[attr = Inline(Hint)]"]'
1
+ //@ is "$.index[?(@.name=='just_inline')].attrs" '[{"other": " #[attr = Inline(Hint)]"} ]'
2
2
#[ inline]
3
3
pub fn just_inline ( ) { }
4
4
5
- //@ is "$.index[?(@.name=='inline_always')].attrs" '[" #[attr = Inline(Always)]"]'
5
+ //@ is "$.index[?(@.name=='inline_always')].attrs" '[{"other": " #[attr = Inline(Always)]"} ]'
6
6
#[ inline( always) ]
7
7
pub fn inline_always ( ) { }
8
8
9
- //@ is "$.index[?(@.name=='inline_never')].attrs" '[" #[attr = Inline(Never)]"]'
9
+ //@ is "$.index[?(@.name=='inline_never')].attrs" '[{"other": " #[attr = Inline(Never)]"} ]'
10
10
#[ inline( never) ]
11
11
pub fn inline_never ( ) { }
Original file line number Diff line number Diff line change 1
1
#![ no_std]
2
2
3
- //@ is "$.index[?(@.name=='example')].attrs" '["#[attr = MustUse]"]'
3
+ //@ is "$.index[?(@.name=='example')].attrs[*].must_use.reason" null
4
4
#[ must_use]
5
5
pub fn example ( ) -> impl Iterator < Item = i64 > { }
6
6
7
- //@ is "$.index[?(@.name=='explicit_message')].attrs" '["#[attr = MustUse {reason: \" does nothing if you do not use it\"}]"] '
7
+ //@ is "$.index[?(@.name=='explicit_message')].attrs[*].must_use.reason " '" does nothing if you do not use it" '
8
8
#[ must_use = "does nothing if you do not use it" ]
9
9
pub fn explicit_message ( ) -> impl Iterator < Item = i64 > { }
Original file line number Diff line number Diff line change 1
1
//@ edition: 2021
2
2
#![ no_std]
3
3
4
- //@ is "$.index[?(@.name=='example')].attrs" '["#[ no_mangle] "]'
4
+ //@ is "$.index[?(@.name=='example')].attrs" '["no_mangle"]'
5
5
#[ no_mangle]
6
6
pub extern "C" fn example ( ) { }
Original file line number Diff line number Diff line change 4
4
// The representation of `#[unsafe(no_mangle)]` in rustdoc in edition 2024
5
5
// is still `#[no_mangle]` without the `unsafe` attribute wrapper.
6
6
7
- //@ is "$.index[?(@.name=='example')].attrs" '["#[ no_mangle] "]'
7
+ //@ is "$.index[?(@.name=='example')].attrs" '["no_mangle"]'
8
8
#[ unsafe( no_mangle) ]
9
9
pub extern "C" fn example ( ) { }
Original file line number Diff line number Diff line change 1
1
#![ no_std]
2
2
3
- //@ is "$.index[?(@.name=='MyEnum')].attrs" '["#[ non_exhaustive] "]'
3
+ //@ is "$.index[?(@.name=='MyEnum')].attrs" '["non_exhaustive"]'
4
4
#[ non_exhaustive]
5
5
pub enum MyEnum {
6
6
First ,
7
7
}
8
8
9
9
pub enum NonExhaustiveVariant {
10
- //@ is "$.index[?(@.name=='Variant')].attrs" '["#[ non_exhaustive] "]'
10
+ //@ is "$.index[?(@.name=='Variant')].attrs" '["non_exhaustive"]'
11
11
#[ non_exhaustive]
12
12
Variant ( i64 ) ,
13
13
}
14
14
15
- //@ is "$.index[?(@.name=='MyStruct')].attrs" '["#[ non_exhaustive] "]'
15
+ //@ is "$.index[?(@.name=='MyStruct')].attrs" '["non_exhaustive"]'
16
16
#[ non_exhaustive]
17
17
pub struct MyStruct {
18
18
pub x : i64 ,
Original file line number Diff line number Diff line change 1
1
#![ no_std]
2
2
3
- //@ is "$.index[?(@.name=='Aligned')].attrs" '["#[repr(align(4))]"]'
3
+ //@ count "$.index[?(@.name=='Aligned')].attrs[*]" 1
4
+ //@ is "$.index[?(@.name=='Aligned')].attrs[*].repr.align" 4
4
5
#[ repr( align( 4 ) ) ]
5
6
pub struct Aligned {
6
7
a : i8 ,
Original file line number Diff line number Diff line change 1
1
#![ no_std]
2
2
3
- //@ is "$.index[?(@.name=='ReprCStruct')].attrs" '["#[repr(C)]"]'
3
+ //@ count "$.index[?(@.name=='ReprCStruct')].attrs" 1
4
+ //@ is "$.index[?(@.name=='ReprCStruct')].attrs[*].repr.kind" '"c"'
5
+ //@ is "$.index[?(@.name=='ReprCStruct')].attrs[*].repr.int" null
6
+ //@ is "$.index[?(@.name=='ReprCStruct')].attrs[*].repr.packed" null
7
+ //@ is "$.index[?(@.name=='ReprCStruct')].attrs[*].repr.align" null
4
8
#[ repr( C ) ]
5
9
pub struct ReprCStruct ( pub i64 ) ;
6
10
7
- //@ is "$.index[?(@.name=='ReprCEnum')].attrs" '["#[repr(C)]"]'
11
+ //@ count "$.index[?(@.name=='ReprCEnum')].attrs" 1
12
+ //@ is "$.index[?(@.name=='ReprCEnum')].attrs[*].repr.kind" '"c"'
13
+ //@ is "$.index[?(@.name=='ReprCEnum')].attrs[*].repr.int" null
14
+ //@ is "$.index[?(@.name=='ReprCEnum')].attrs[*].repr.packed" null
15
+ //@ is "$.index[?(@.name=='ReprCEnum')].attrs[*].repr.align" null
8
16
#[ repr( C ) ]
9
17
pub enum ReprCEnum {
10
18
First ,
11
19
}
12
20
13
- //@ is "$.index[?(@.name=='ReprCUnion')].attrs" '["#[repr(C)]"]'
21
+ //@ count "$.index[?(@.name=='ReprCUnion')].attrs" 1
22
+ //@ is "$.index[?(@.name=='ReprCUnion')].attrs[*].repr.kind" '"c"'
23
+ //@ is "$.index[?(@.name=='ReprCUnion')].attrs[*].repr.int" null
24
+ //@ is "$.index[?(@.name=='ReprCUnion')].attrs[*].repr.packed" null
25
+ //@ is "$.index[?(@.name=='ReprCUnion')].attrs[*].repr.align" null
14
26
#[ repr( C ) ]
15
27
pub union ReprCUnion {
16
28
pub left : i64 ,
You can’t perform that action at this time.
0 commit comments