]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/borrowck/borrowck-storage-dead.stderr
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / borrowck / borrowck-storage-dead.stderr
index c291ed224eb3c632d6515e4adf60598aed1be88e..3a413153acd19c39ec2068ad75ef438aedde7648 100644 (file)
@@ -1,15 +1,16 @@
-error[E0381]: use of possibly uninitialized variable: `x` (Ast)
-  --> $DIR/borrowck-storage-dead.rs:18:17
+error[E0381]: used binding `x` isn't initialized
+  --> $DIR/borrowck-storage-dead.rs:16:17
    |
+LL |         let x: i32;
+   |             - binding declared here but left uninitialized
 LL |         let _ = x + 1;
-   |                 ^ use of possibly uninitialized `x`
-
-error[E0381]: use of possibly uninitialized variable: `x` (Mir)
-  --> $DIR/borrowck-storage-dead.rs:18:17
+   |                 ^ `x` used here but it isn't initialized
    |
-LL |         let _ = x + 1;
-   |                 ^ use of possibly uninitialized `x`
+help: consider assigning a value
+   |
+LL |         let x: i32 = 0;
+   |                    +++
 
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
 For more information about this error, try `rustc --explain E0381`.