rust/src/test/ui/nll/issue-54556-used-vs-unused-tails.stderr
Oliver Scherer 61efc3b71b Update tests
2018-12-04 10:06:05 +01:00

87 lines
5.3 KiB
Plaintext

error[E0597]: `_t1` does not live long enough
--> $DIR/issue-54556-used-vs-unused-tails.rs:10:56
|
LL | { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } ; // suggest `;`
| ^^^ - - borrowed value needs to live until here
| | |
| | `_t1` dropped here while still borrowed
| borrowed value does not live long enough
error[E0597]: `_t1` does not live long enough
--> $DIR/issue-54556-used-vs-unused-tails.rs:13:56
|
LL | { { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } } ; // suggest `;`
| ^^^ - - borrowed value needs to live until here
| | |
| | `_t1` dropped here while still borrowed
| borrowed value does not live long enough
error[E0597]: `_t1` does not live long enough
--> $DIR/issue-54556-used-vs-unused-tails.rs:16:56
|
LL | { { let mut _t1 = D(Box::new("t1")); D(&_t1).end() }; } // suggest `;`
| ^^^ -- borrowed value needs to live until here
| | |
| | `_t1` dropped here while still borrowed
| borrowed value does not live long enough
error[E0597]: `_t1` does not live long enough
--> $DIR/issue-54556-used-vs-unused-tails.rs:19:56
|
LL | let _ = { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } ; // suggest `;`
| ^^^ - - borrowed value needs to live until here
| | |
| | `_t1` dropped here while still borrowed
| borrowed value does not live long enough
error[E0597]: `_t1` does not live long enough
--> $DIR/issue-54556-used-vs-unused-tails.rs:22:56
|
LL | let _u = { let mut _t1 = D(Box::new("t1")); D(&_t1).unit() } ; // suggest `;`
| ^^^ - - borrowed value needs to live until here
| | |
| | `_t1` dropped here while still borrowed
| borrowed value does not live long enough
error[E0597]: `_t1` does not live long enough
--> $DIR/issue-54556-used-vs-unused-tails.rs:25:56
|
LL | let _x = { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } ; // `let x = ...; x`
| ^^^ - - borrowed value needs to live until here
| | |
| | `_t1` dropped here while still borrowed
| borrowed value does not live long enough
error[E0597]: `_t1` does not live long enough
--> $DIR/issue-54556-used-vs-unused-tails.rs:30:56
|
LL | _y = { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } ; // `let x = ...; x`
| ^^^ - - borrowed value needs to live until here
| | |
| | `_t1` dropped here while still borrowed
| borrowed value does not live long enough
error[E0597]: `_t1` does not live long enough
--> $DIR/issue-54556-used-vs-unused-tails.rs:37:56
|
LL | fn f_local_ref() { let mut _t1 = D(Box::new("t1")); D(&_t1).unit() } // suggest `;`
| ^^^ - `_t1` dropped here while still borrowed
| |
| borrowed value does not live long enough
|
= note: values in a scope are dropped in the opposite order they are created
error[E0597]: `_t1` does not live long enough
--> $DIR/issue-54556-used-vs-unused-tails.rs:40:56
|
LL | fn f() -> String { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } // `let x = ...; x`
| ^^^ - `_t1` dropped here while still borrowed
| |
| borrowed value does not live long enough
|
= note: values in a scope are dropped in the opposite order they are created
error: aborting due to 9 previous errors
For more information about this error, try `rustc --explain E0597`.