File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
compiler/rustc_attr_parsing/src/attributes Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,8 @@ impl<S: Stage> CombineAttributeParser<S> for ReprParser {
2525 const PATH : & [ Symbol ] = & [ sym:: repr] ;
2626 const CONVERT : ConvertFn < Self :: Item > = AttributeKind :: Repr ;
2727 // FIXME(jdonszelmann): never used
28- const TEMPLATE : AttributeTemplate = template ! ( List : "C" ) ;
28+ const TEMPLATE : AttributeTemplate =
29+ template ! ( List : "C | Rust | align(...) | packed(...) | <integer type> | transparent" ) ;
2930
3031 fn extend < ' c > (
3132 cx : & ' c mut AcceptContext < ' _ , ' _ , S > ,
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ LL | #[repr]
3838 | ^^^^^^^
3939 | |
4040 | expected this to be a list
41- | help: must be of the form: `#[repr(C)]`
41+ | help: must be of the form: `#[repr(C | Rust | align(...) | packed(...) | <integer type> | transparent )]`
4242
4343error[E0539]: malformed `inline` attribute input
4444 --> $DIR/issue-43988.rs:30:5
@@ -64,7 +64,7 @@ LL | let _z = #[repr] 1;
6464 | ^^^^^^^
6565 | |
6666 | expected this to be a list
67- | help: must be of the form: `#[repr(C)]`
67+ | help: must be of the form: `#[repr(C | Rust | align(...) | packed(...) | <integer type> | transparent )]`
6868
6969error[E0518]: attribute should be applied to function or closure
7070 --> $DIR/issue-43988.rs:5:5
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ LL | #[repr]
55 | ^^^^^^^
66 | |
77 | expected this to be a list
8- | help: must be of the form: `#[repr(C)]`
8+ | help: must be of the form: `#[repr(C | Rust | align(...) | packed(...) | <integer type> | transparent )]`
99
1010error[E0539]: malformed `repr` attribute input
1111 --> $DIR/repr.rs:4:1
@@ -14,7 +14,7 @@ LL | #[repr = "B"]
1414 | ^^^^^^^^^^^^^
1515 | |
1616 | expected this to be a list
17- | help: must be of the form: `#[repr(C)]`
17+ | help: must be of the form: `#[repr(C | Rust | align(...) | packed(...) | <integer type> | transparent )]`
1818
1919error[E0539]: malformed `repr` attribute input
2020 --> $DIR/repr.rs:7:1
@@ -23,7 +23,7 @@ LL | #[repr = "C"]
2323 | ^^^^^^^^^^^^^
2424 | |
2525 | expected this to be a list
26- | help: must be of the form: `#[repr(C)]`
26+ | help: must be of the form: `#[repr(C | Rust | align(...) | packed(...) | <integer type> | transparent )]`
2727
2828error: aborting due to 3 previous errors
2929
You can’t perform that action at this time.
0 commit comments