summaryrefslogtreecommitdiffstats
path: root/src/test/ui/union
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/union/union-copy.stderr4
-rw-r--r--src/test/ui/union/union-generic.mirunsafeck.stderr4
-rw-r--r--src/test/ui/union/union-generic.thirunsafeck.stderr4
-rw-r--r--src/test/ui/union/union-nonrepresentable.stderr10
-rw-r--r--src/test/ui/union/union-repr-c.stderr10
5 files changed, 16 insertions, 16 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-generic.mirunsafeck.stderr b/src/test/ui/union/union-generic.mirunsafeck.stderr
index a4f0c400d..037022a91 100644
--- a/src/test/ui/union/union-generic.mirunsafeck.stderr
+++ b/src/test/ui/union/union-generic.mirunsafeck.stderr
@@ -11,10 +11,10 @@ LL | union U<T: Copy> {
| ^^^^ required by this bound in `U`
error[E0277]: the trait bound `Rc<u32>: Copy` is not satisfied
- --> $DIR/union-generic.rs:13:13
+ --> $DIR/union-generic.rs:13:17
|
LL | let u = U::<Rc<u32>> { a: Default::default() };
- | ^^^^^^^^^^^^ the trait `Copy` is not implemented for `Rc<u32>`
+ | ^^^^^^^ the trait `Copy` is not implemented for `Rc<u32>`
|
note: required by a bound in `U`
--> $DIR/union-generic.rs:6:12
diff --git a/src/test/ui/union/union-generic.thirunsafeck.stderr b/src/test/ui/union/union-generic.thirunsafeck.stderr
index a4f0c400d..037022a91 100644
--- a/src/test/ui/union/union-generic.thirunsafeck.stderr
+++ b/src/test/ui/union/union-generic.thirunsafeck.stderr
@@ -11,10 +11,10 @@ LL | union U<T: Copy> {
| ^^^^ required by this bound in `U`
error[E0277]: the trait bound `Rc<u32>: Copy` is not satisfied
- --> $DIR/union-generic.rs:13:13
+ --> $DIR/union-generic.rs:13:17
|
LL | let u = U::<Rc<u32>> { a: Default::default() };
- | ^^^^^^^^^^^^ the trait `Copy` is not implemented for `Rc<u32>`
+ | ^^^^^^^ the trait `Copy` is not implemented for `Rc<u32>`
|
note: required by a bound in `U`
--> $DIR/union-generic.rs:6:12
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