]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-54556-used-vs-unused-tails.stderr
e9e4e51136d0a98eec6fd9c5af171fd9646cfc3a
[rust.git] / src / test / ui / nll / issue-54556-used-vs-unused-tails.stderr
1 error[E0597]: `_t1` does not live long enough
2   --> $DIR/issue-54556-used-vs-unused-tails.rs:10:56
3    |
4 LL |     {              let mut _t1 = D(Box::new("t1")); D(&_t1).end()    } ; // suggest `;`
5    |                                                        ^^^           - - borrowed value needs to live until here
6    |                                                        |             |
7    |                                                        |             `_t1` dropped here while still borrowed
8    |                                                        borrowed value does not live long enough
9
10 error[E0597]: `_t1` does not live long enough
11   --> $DIR/issue-54556-used-vs-unused-tails.rs:13:56
12    |
13 LL |     {            { let mut _t1 = D(Box::new("t1")); D(&_t1).end() }  } ; // suggest `;`
14    |                                                        ^^^        -    - borrowed value needs to live until here
15    |                                                        |          |
16    |                                                        |          `_t1` dropped here while still borrowed
17    |                                                        borrowed value does not live long enough
18
19 error[E0597]: `_t1` does not live long enough
20   --> $DIR/issue-54556-used-vs-unused-tails.rs:16:56
21    |
22 LL |     {            { let mut _t1 = D(Box::new("t1")); D(&_t1).end() }; }   // suggest `;`
23    |                                                        ^^^        -- borrowed value needs to live until here
24    |                                                        |          |
25    |                                                        |          `_t1` dropped here while still borrowed
26    |                                                        borrowed value does not live long enough
27
28 error[E0597]: `_t1` does not live long enough
29   --> $DIR/issue-54556-used-vs-unused-tails.rs:19:56
30    |
31 LL |     let _ =      { let mut _t1 = D(Box::new("t1")); D(&_t1).end()    } ; // suggest `;`
32    |                                                        ^^^           - - borrowed value needs to live until here
33    |                                                        |             |
34    |                                                        |             `_t1` dropped here while still borrowed
35    |                                                        borrowed value does not live long enough
36
37 error[E0597]: `_t1` does not live long enough
38   --> $DIR/issue-54556-used-vs-unused-tails.rs:22:56
39    |
40 LL |     let _u =     { let mut _t1 = D(Box::new("t1")); D(&_t1).unit()   } ; // suggest `;`
41    |                                                        ^^^           - - borrowed value needs to live until here
42    |                                                        |             |
43    |                                                        |             `_t1` dropped here while still borrowed
44    |                                                        borrowed value does not live long enough
45
46 error[E0597]: `_t1` does not live long enough
47   --> $DIR/issue-54556-used-vs-unused-tails.rs:25:56
48    |
49 LL |     let _x =     { let mut _t1 = D(Box::new("t1")); D(&_t1).end()    } ; // `let x = ...; x`
50    |                                                        ^^^           - - borrowed value needs to live until here
51    |                                                        |             |
52    |                                                        |             `_t1` dropped here while still borrowed
53    |                                                        borrowed value does not live long enough
54
55 error[E0597]: `_t1` does not live long enough
56   --> $DIR/issue-54556-used-vs-unused-tails.rs:30:56
57    |
58 LL |     _y =         { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } ; // `let x = ...; x`
59    |                                                        ^^^        - - borrowed value needs to live until here
60    |                                                        |          |
61    |                                                        |          `_t1` dropped here while still borrowed
62    |                                                        borrowed value does not live long enough
63
64 error[E0597]: `_t1` does not live long enough
65   --> $DIR/issue-54556-used-vs-unused-tails.rs:37:56
66    |
67 LL | fn f_local_ref() { let mut _t1 = D(Box::new("t1")); D(&_t1).unit()   }  // suggest `;`
68    |                                                        ^^^           - `_t1` dropped here while still borrowed
69    |                                                        |
70    |                                                        borrowed value does not live long enough
71    |
72    = note: values in a scope are dropped in the opposite order they are created
73
74 error[E0597]: `_t1` does not live long enough
75   --> $DIR/issue-54556-used-vs-unused-tails.rs:40:56
76    |
77 LL | fn f() -> String { let mut _t1 = D(Box::new("t1")); D(&_t1).end()   }   // `let x = ...; x`
78    |                                                        ^^^          - `_t1` dropped here while still borrowed
79    |                                                        |
80    |                                                        borrowed value does not live long enough
81    |
82    = note: values in a scope are dropped in the opposite order they are created
83
84 error: aborting due to 9 previous errors
85
86 For more information about this error, try `rustc --explain E0597`.