diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:11:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:12:43 +0000 |
commit | cf94bdc0742c13e2a0cac864c478b8626b266e1b (patch) | |
tree | 044670aa50cc5e2b4229aa0b6b3df6676730c0a6 /src/test/ui/union | |
parent | Adding debian version 1.65.0+dfsg1-2. (diff) | |
download | rustc-cf94bdc0742c13e2a0cac864c478b8626b266e1b.tar.xz rustc-cf94bdc0742c13e2a0cac864c478b8626b266e1b.zip |
Merging upstream version 1.66.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/union/union-copy.stderr | 4 | ||||
-rw-r--r-- | src/test/ui/union/union-nonrepresentable.stderr | 10 | ||||
-rw-r--r-- | src/test/ui/union/union-repr-c.stderr | 10 |
3 files changed, 12 insertions, 12 deletions
diff --git a/src/test/ui/union/union-copy.stderr b/src/test/ui/union/union-copy.stderr index 8ecdafdde..53ee4dd2e 100644 --- a/src/test/ui/union/union-copy.stderr +++ b/src/test/ui/union/union-copy.stderr @@ -1,11 +1,11 @@ error[E0204]: the trait `Copy` may not be implemented for this type - --> $DIR/union-copy.rs:12:6 + --> $DIR/union-copy.rs:12:15 | LL | a: std::mem::ManuallyDrop<String> | --------------------------------- this field does not implement `Copy` ... LL | impl Copy for W {} - | ^^^^ + | ^ | note: the `Copy` impl for `ManuallyDrop<String>` requires that `String: Copy` --> $DIR/union-copy.rs:8:8 diff --git a/src/test/ui/union/union-nonrepresentable.stderr b/src/test/ui/union/union-nonrepresentable.stderr index 9804b1418..c266d2e9e 100644 --- a/src/test/ui/union/union-nonrepresentable.stderr +++ b/src/test/ui/union/union-nonrepresentable.stderr @@ -2,15 +2,15 @@ error[E0072]: recursive type `U` has infinite size --> $DIR/union-nonrepresentable.rs:1:1 | LL | union U { - | ^^^^^^^ recursive type has infinite size + | ^^^^^^^ LL | a: u8, LL | b: std::mem::ManuallyDrop<U>, - | ------------------------- recursive without indirection + | - recursive without indirection | -help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `U` representable +help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle | -LL | b: Box<std::mem::ManuallyDrop<U>>, - | ++++ + +LL | b: std::mem::ManuallyDrop<Box<U>>, + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/union/union-repr-c.stderr b/src/test/ui/union/union-repr-c.stderr index 9abf440f7..49124eee5 100644 --- a/src/test/ui/union/union-repr-c.stderr +++ b/src/test/ui/union/union-repr-c.stderr @@ -4,11 +4,6 @@ error: `extern` block uses type `W`, which is not FFI-safe LL | static FOREIGN2: W; | ^ not FFI-safe | -note: the lint level is defined here - --> $DIR/union-repr-c.rs:2:9 - | -LL | #![deny(improper_ctypes)] - | ^^^^^^^^^^^^^^^ = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this union = note: this union has unspecified layout note: the type is defined here @@ -16,6 +11,11 @@ note: the type is defined here | LL | union W { | ^^^^^^^ +note: the lint level is defined here + --> $DIR/union-repr-c.rs:2:9 + | +LL | #![deny(improper_ctypes)] + | ^^^^^^^^^^^^^^^ error: aborting due to previous error |