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 {
25
25
const PATH : & [ Symbol ] = & [ sym:: repr] ;
26
26
const CONVERT : ConvertFn < Self :: Item > = AttributeKind :: Repr ;
27
27
// 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" ) ;
29
30
30
31
fn extend < ' c > (
31
32
cx : & ' c mut AcceptContext < ' _ , ' _ , S > ,
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ LL | #[repr]
38
38
| ^^^^^^^
39
39
| |
40
40
| 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 )]`
42
42
43
43
error[E0539]: malformed `inline` attribute input
44
44
--> $DIR/issue-43988.rs:30:5
@@ -64,7 +64,7 @@ LL | let _z = #[repr] 1;
64
64
| ^^^^^^^
65
65
| |
66
66
| 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 )]`
68
68
69
69
error[E0518]: attribute should be applied to function or closure
70
70
--> $DIR/issue-43988.rs:5:5
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ LL | #[repr]
5
5
| ^^^^^^^
6
6
| |
7
7
| 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 )]`
9
9
10
10
error[E0539]: malformed `repr` attribute input
11
11
--> $DIR/repr.rs:4:1
@@ -14,7 +14,7 @@ LL | #[repr = "B"]
14
14
| ^^^^^^^^^^^^^
15
15
| |
16
16
| 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 )]`
18
18
19
19
error[E0539]: malformed `repr` attribute input
20
20
--> $DIR/repr.rs:7:1
@@ -23,7 +23,7 @@ LL | #[repr = "C"]
23
23
| ^^^^^^^^^^^^^
24
24
| |
25
25
| 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 )]`
27
27
28
28
error: aborting due to 3 previous errors
29
29
You can’t perform that action at this time.
0 commit comments