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 {
99 }
1010}
1111
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"]'
1313//@ 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 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" ]
66pub extern "C" fn example ( ) { }
Original file line number Diff line number Diff line change 22#![ no_std]
33
44// 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`.
66
7- //@ is "$.index[?(@.name=='example')].attrs" '["#[ export_name = \ "altered\"]" ]'
7+ //@ is "$.index[?(@.name=='example')].attrs" '[{" export_name": "altered"} ]'
88#[ unsafe( export_name = "altered" ) ]
99pub 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)]"} ]'
22#[ inline]
33pub fn just_inline ( ) { }
44
5- //@ is "$.index[?(@.name=='inline_always')].attrs" '[" #[attr = Inline(Always)]"]'
5+ //@ is "$.index[?(@.name=='inline_always')].attrs" '[{"other": " #[attr = Inline(Always)]"} ]'
66#[ inline( always) ]
77pub fn inline_always ( ) { }
88
9- //@ is "$.index[?(@.name=='inline_never')].attrs" '[" #[attr = Inline(Never)]"]'
9+ //@ is "$.index[?(@.name=='inline_never')].attrs" '[{"other": " #[attr = Inline(Never)]"} ]'
1010#[ inline( never) ]
1111pub fn inline_never ( ) { }
Original file line number Diff line number Diff line change 11#![ no_std]
22
3- //@ is "$.index[?(@.name=='example')].attrs" '["#[attr = MustUse]"]'
3+ //@ is "$.index[?(@.name=='example')].attrs[*].must_use.reason" null
44#[ must_use]
55pub fn example ( ) -> impl Iterator < Item = i64 > { }
66
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" '
88#[ must_use = "does nothing if you do not use it" ]
99pub fn explicit_message ( ) -> impl Iterator < Item = i64 > { }
Original file line number Diff line number Diff line change 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]
66pub extern "C" fn example ( ) { }
Original file line number Diff line number Diff line change 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) ]
99pub extern "C" fn example ( ) { }
Original file line number Diff line number Diff line change 11#![ no_std]
22
3- //@ is "$.index[?(@.name=='MyEnum')].attrs" '["#[ non_exhaustive] "]'
3+ //@ is "$.index[?(@.name=='MyEnum')].attrs" '["non_exhaustive"]'
44#[ non_exhaustive]
55pub enum MyEnum {
66 First ,
77}
88
99pub 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]
1717pub struct MyStruct {
1818 pub x : i64 ,
Original file line number Diff line number Diff line change 11#![ no_std]
22
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
45#[ repr( align( 4 ) ) ]
56pub struct Aligned {
67 a : i8 ,
Original file line number Diff line number Diff line change 11#![ no_std]
22
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
48#[ repr( C ) ]
59pub struct ReprCStruct ( pub i64 ) ;
610
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
816#[ repr( C ) ]
917pub enum ReprCEnum {
1018 First ,
1119}
1220
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
1426#[ repr( C ) ]
1527pub union ReprCUnion {
1628 pub left : i64 ,
You can’t perform that action at this time.
0 commit comments