]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/borrowck/borrowck-uninit-ref-chain.stderr
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / borrowck / borrowck-uninit-ref-chain.stderr
index c486cb6dd0cd338f4c01c11e21f750b5a1f95d4c..73fded7545cc62c1188f2c4ad4a9c4c9a3c1ea8a 100644 (file)
@@ -5,6 +5,11 @@ LL |     let x: &&Box<i32>;
    |         - binding declared here but left uninitialized
 LL |     let _y = &**x;
    |              ^^^^ `**x` used here but it isn't initialized
+   |
+help: consider assigning a value
+   |
+LL |     let x: &&Box<i32> = todo!();
+   |                       +++++++++
 
 error[E0381]: used binding `x` isn't initialized
   --> $DIR/borrowck-uninit-ref-chain.rs:11:14
@@ -13,6 +18,11 @@ LL |     let x: &&S<i32, i32>;
    |         - binding declared here but left uninitialized
 LL |     let _y = &**x;
    |              ^^^^ `**x` used here but it isn't initialized
+   |
+help: consider assigning a value
+   |
+LL |     let x: &&S<i32, i32> = todo!();
+   |                          +++++++++
 
 error[E0381]: used binding `x` isn't initialized
   --> $DIR/borrowck-uninit-ref-chain.rs:14:14
@@ -21,6 +31,11 @@ LL |     let x: &&i32;
    |         - binding declared here but left uninitialized
 LL |     let _y = &**x;
    |              ^^^^ `**x` used here but it isn't initialized
+   |
+help: consider assigning a value
+   |
+LL |     let x: &&i32 = todo!();
+   |                  +++++++++
 
 error[E0381]: partially assigned binding `a` isn't fully initialized
   --> $DIR/borrowck-uninit-ref-chain.rs:18:5