about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2020-10-28 08:57:57 +0100
committerRalf Jung <post@ralfj.de>2020-11-20 10:58:31 +0100
commitaf309cc2d93ce1e8e57cedffbfc35f9df040376a (patch)
tree9be42fd4bbf10583b60e30f1479296ad9dbb1621 /src
parent63bdb3ac0948683fe7548680d3b78bb5d8b32076 (diff)
downloadrust-af309cc2d93ce1e8e57cedffbfc35f9df040376a.tar.gz
rust-af309cc2d93ce1e8e57cedffbfc35f9df040376a.zip
needs -> might need
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/union/union-unsafe.rs4
-rw-r--r--src/test/ui/union/union-unsafe.stderr8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/test/ui/union/union-unsafe.rs b/src/test/ui/union/union-unsafe.rs
index 9c7ed1f7bfc..6adf0ac59b9 100644
--- a/src/test/ui/union/union-unsafe.rs
+++ b/src/test/ui/union/union-unsafe.rs
@@ -32,8 +32,8 @@ fn deref_union_field(mut u: URef) {
 }
 
 fn assign_noncopy_union_field(mut u: URefCell) {
-    u.a = (RefCell::new(0), 1); //~ ERROR assignment to union field that needs dropping
-    u.a.0 = RefCell::new(0); //~ ERROR assignment to union field that needs dropping
+    u.a = (RefCell::new(0), 1); //~ ERROR assignment to union field that might need dropping
+    u.a.0 = RefCell::new(0); //~ ERROR assignment to union field that might need dropping
     u.a.1 = 1; // OK
 }
 
diff --git a/src/test/ui/union/union-unsafe.stderr b/src/test/ui/union/union-unsafe.stderr
index f80d4394f84..a25c09144f7 100644
--- a/src/test/ui/union/union-unsafe.stderr
+++ b/src/test/ui/union/union-unsafe.stderr
@@ -6,19 +6,19 @@ LL |     *(u.p) = 13;
    |
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
-error[E0133]: assignment to union field that needs dropping is unsafe and requires unsafe function or block
+error[E0133]: assignment to union field that might need dropping is unsafe and requires unsafe function or block
   --> $DIR/union-unsafe.rs:35:5
    |
 LL |     u.a = (RefCell::new(0), 1);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ assignment to union field that needs dropping
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ assignment to union field that might need dropping
    |
    = note: the previous content of the field will be dropped, which causes undefined behavior if the field was not properly initialized
 
-error[E0133]: assignment to union field that needs dropping is unsafe and requires unsafe function or block
+error[E0133]: assignment to union field that might need dropping is unsafe and requires unsafe function or block
   --> $DIR/union-unsafe.rs:36:5
    |
 LL |     u.a.0 = RefCell::new(0);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^ assignment to union field that needs dropping
+   |     ^^^^^^^^^^^^^^^^^^^^^^^ assignment to union field that might need dropping
    |
    = note: the previous content of the field will be dropped, which causes undefined behavior if the field was not properly initialized