diff options
| author | Mark Simulacrum <mark.simulacrum@gmail.com> | 2018-06-02 19:55:04 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-02 19:55:04 -0600 |
| commit | a6ab2153f679d72ac63a5f200e721e8d4c27e2af (patch) | |
| tree | 4f7499253ee118eb3f009e6b097dd1aaa9b3df7f /src/test | |
| parent | 3515dab431702f3a926f61f52cd0743d95e4fd3f (diff) | |
| parent | 5c374739b679612c2fe8d033b0607beb14a5c4d3 (diff) | |
| download | rust-a6ab2153f679d72ac63a5f200e721e8d4c27e2af.tar.gz rust-a6ab2153f679d72ac63a5f200e721e8d4c27e2af.zip | |
Rollup merge of #51143 - Mark-Simulacrum:issue-50826, r=cramertj
Specify that packed types must derive, not implement, Copy
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/deriving-with-repr-packed.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/deriving-with-repr-packed.stderr | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/test/ui/deriving-with-repr-packed.rs b/src/test/ui/deriving-with-repr-packed.rs index 0c52829799e..43375098cb5 100644 --- a/src/test/ui/deriving-with-repr-packed.rs +++ b/src/test/ui/deriving-with-repr-packed.rs @@ -33,7 +33,7 @@ pub struct Bar(u32, u32, u32); struct Y(usize); #[derive(PartialEq)] -//~^ ERROR #[derive] can't be used on a non-Copy #[repr(packed)] +//~^ ERROR #[derive] can't be used //~| hard error #[repr(packed)] struct X(Y); diff --git a/src/test/ui/deriving-with-repr-packed.stderr b/src/test/ui/deriving-with-repr-packed.stderr index 64aefbcd5df..a7599c1e7db 100644 --- a/src/test/ui/deriving-with-repr-packed.stderr +++ b/src/test/ui/deriving-with-repr-packed.stderr @@ -21,7 +21,7 @@ LL | #[derive(Copy, Clone, PartialEq, Eq)] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #46043 <https://github.com/rust-lang/rust/issues/46043> -error: #[derive] can't be used on a non-Copy #[repr(packed)] struct (error E0133) +error: #[derive] can't be used on a #[repr(packed)] struct that does not derive Copy (error E0133) --> $DIR/deriving-with-repr-packed.rs:26:10 | LL | #[derive(PartialEq, Eq)] @@ -30,7 +30,7 @@ LL | #[derive(PartialEq, Eq)] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #46043 <https://github.com/rust-lang/rust/issues/46043> -error: #[derive] can't be used on a non-Copy #[repr(packed)] struct (error E0133) +error: #[derive] can't be used on a #[repr(packed)] struct that does not derive Copy (error E0133) --> $DIR/deriving-with-repr-packed.rs:35:10 | LL | #[derive(PartialEq)] |
