diff options
Diffstat (limited to 'tests/ui/pin_project/packed-name-value.rs')
-rw-r--r-- | tests/ui/pin_project/packed-name-value.rs | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/tests/ui/pin_project/packed-name-value.rs b/tests/ui/pin_project/packed-name-value.rs index dedc403..ed819ca 100644 --- a/tests/ui/pin_project/packed-name-value.rs +++ b/tests/ui/pin_project/packed-name-value.rs @@ -1,24 +1,17 @@ use pin_project::pin_project; -// #[repr(packed = "")] is not valid format of #[repr(packed)] and will be -// rejected by rustc. -// However, we should not rely on the behavior of rustc that rejects this. -// https://github.com/taiki-e/pin-project/pull/324#discussion_r612388001 - -// https://github.com/taiki-e/pin-project/pull/324#discussion_r612388001 -// https://github.com/rust-lang/rust/issues/83921 -// #[repr(packed = "")] //~ ERROR E0552 -// struct S1 { -// f: (), -// } +#[repr(packed = "")] //~ ERROR E0552 +struct S1 { + f: (), +} #[pin_project] -#[repr(packed = "")] //~ ERROR attribute should not be name-value pair +#[repr(packed = "")] //~ ERROR E0552 struct S2 { f: (), } -#[repr(packed = "")] //~ ERROR attribute should not be name-value pair +#[repr(packed = "")] //~ ERROR E0552 #[pin_project] struct S3 { f: (), |