better template for repr attributes
This commit is contained in:
@@ -25,7 +25,8 @@ impl<S: Stage> CombineAttributeParser<S> for ReprParser {
|
|||||||
const PATH: &[Symbol] = &[sym::repr];
|
const PATH: &[Symbol] = &[sym::repr];
|
||||||
const CONVERT: ConvertFn<Self::Item> = AttributeKind::Repr;
|
const CONVERT: ConvertFn<Self::Item> = AttributeKind::Repr;
|
||||||
// FIXME(jdonszelmann): never used
|
// FIXME(jdonszelmann): never used
|
||||||
const TEMPLATE: AttributeTemplate = template!(List: "C");
|
const TEMPLATE: AttributeTemplate =
|
||||||
|
template!(List: "C | Rust | align(...) | packed(...) | <integer type> | transparent");
|
||||||
|
|
||||||
fn extend<'c>(
|
fn extend<'c>(
|
||||||
cx: &'c mut AcceptContext<'_, '_, S>,
|
cx: &'c mut AcceptContext<'_, '_, S>,
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ LL | #[repr]
|
|||||||
| ^^^^^^^
|
| ^^^^^^^
|
||||||
| |
|
| |
|
||||||
| expected this to be a list
|
| expected this to be a list
|
||||||
| help: must be of the form: `#[repr(C)]`
|
| help: must be of the form: `#[repr(C | Rust | align(...) | packed(...) | <integer type> | transparent)]`
|
||||||
|
|
||||||
error[E0539]: malformed `inline` attribute input
|
error[E0539]: malformed `inline` attribute input
|
||||||
--> $DIR/issue-43988.rs:30:5
|
--> $DIR/issue-43988.rs:30:5
|
||||||
@@ -64,7 +64,7 @@ LL | let _z = #[repr] 1;
|
|||||||
| ^^^^^^^
|
| ^^^^^^^
|
||||||
| |
|
| |
|
||||||
| expected this to be a list
|
| expected this to be a list
|
||||||
| help: must be of the form: `#[repr(C)]`
|
| help: must be of the form: `#[repr(C | Rust | align(...) | packed(...) | <integer type> | transparent)]`
|
||||||
|
|
||||||
error[E0518]: attribute should be applied to function or closure
|
error[E0518]: attribute should be applied to function or closure
|
||||||
--> $DIR/issue-43988.rs:5:5
|
--> $DIR/issue-43988.rs:5:5
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ LL | #[repr]
|
|||||||
| ^^^^^^^
|
| ^^^^^^^
|
||||||
| |
|
| |
|
||||||
| expected this to be a list
|
| expected this to be a list
|
||||||
| help: must be of the form: `#[repr(C)]`
|
| help: must be of the form: `#[repr(C | Rust | align(...) | packed(...) | <integer type> | transparent)]`
|
||||||
|
|
||||||
error[E0539]: malformed `repr` attribute input
|
error[E0539]: malformed `repr` attribute input
|
||||||
--> $DIR/repr.rs:4:1
|
--> $DIR/repr.rs:4:1
|
||||||
@@ -14,7 +14,7 @@ LL | #[repr = "B"]
|
|||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
| |
|
| |
|
||||||
| expected this to be a list
|
| expected this to be a list
|
||||||
| help: must be of the form: `#[repr(C)]`
|
| help: must be of the form: `#[repr(C | Rust | align(...) | packed(...) | <integer type> | transparent)]`
|
||||||
|
|
||||||
error[E0539]: malformed `repr` attribute input
|
error[E0539]: malformed `repr` attribute input
|
||||||
--> $DIR/repr.rs:7:1
|
--> $DIR/repr.rs:7:1
|
||||||
@@ -23,7 +23,7 @@ LL | #[repr = "C"]
|
|||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
| |
|
| |
|
||||||
| expected this to be a list
|
| expected this to be a list
|
||||||
| help: must be of the form: `#[repr(C)]`
|
| help: must be of the form: `#[repr(C | Rust | align(...) | packed(...) | <integer type> | transparent)]`
|
||||||
|
|
||||||
error: aborting due to 3 previous errors
|
error: aborting due to 3 previous errors
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user