94 lines
3.7 KiB
Plaintext
94 lines
3.7 KiB
Plaintext
error[E0597]: borrowed value does not live long enough
|
|
--> $DIR/cleanup-rvalue-scopes-cf.rs:28:19
|
|
|
|
|
LL | let _x = arg(&AddFlags(1)); //~ ERROR value does not live long enough
|
|
| ^^^^^^^^^^^ - temporary value dropped here while still borrowed
|
|
| |
|
|
| temporary value does not live long enough
|
|
...
|
|
LL | }
|
|
| - temporary value needs to live until here
|
|
|
|
|
= note: consider using a `let` binding to increase its lifetime
|
|
|
|
error[E0597]: borrowed value does not live long enough
|
|
--> $DIR/cleanup-rvalue-scopes-cf.rs:29:14
|
|
|
|
|
LL | let _x = AddFlags(1).get(); //~ ERROR value does not live long enough
|
|
| ^^^^^^^^^^^ - temporary value dropped here while still borrowed
|
|
| |
|
|
| temporary value does not live long enough
|
|
...
|
|
LL | }
|
|
| - temporary value needs to live until here
|
|
|
|
|
= note: consider using a `let` binding to increase its lifetime
|
|
|
|
error[E0597]: borrowed value does not live long enough
|
|
--> $DIR/cleanup-rvalue-scopes-cf.rs:30:21
|
|
|
|
|
LL | let _x = &*arg(&AddFlags(1)); //~ ERROR value does not live long enough
|
|
| ^^^^^^^^^^^ - temporary value dropped here while still borrowed
|
|
| |
|
|
| temporary value does not live long enough
|
|
...
|
|
LL | }
|
|
| - temporary value needs to live until here
|
|
|
|
|
= note: consider using a `let` binding to increase its lifetime
|
|
|
|
error[E0597]: borrowed value does not live long enough
|
|
--> $DIR/cleanup-rvalue-scopes-cf.rs:31:24
|
|
|
|
|
LL | let ref _x = *arg(&AddFlags(1)); //~ ERROR value does not live long enough
|
|
| ^^^^^^^^^^^ - temporary value dropped here while still borrowed
|
|
| |
|
|
| temporary value does not live long enough
|
|
...
|
|
LL | }
|
|
| - temporary value needs to live until here
|
|
|
|
|
= note: consider using a `let` binding to increase its lifetime
|
|
|
|
error[E0597]: borrowed value does not live long enough
|
|
--> $DIR/cleanup-rvalue-scopes-cf.rs:32:24
|
|
|
|
|
LL | let &ref _x = arg(&AddFlags(1)); //~ ERROR value does not live long enough
|
|
| ^^^^^^^^^^^ - temporary value dropped here while still borrowed
|
|
| |
|
|
| temporary value does not live long enough
|
|
...
|
|
LL | }
|
|
| - temporary value needs to live until here
|
|
|
|
|
= note: consider using a `let` binding to increase its lifetime
|
|
|
|
error[E0597]: borrowed value does not live long enough
|
|
--> $DIR/cleanup-rvalue-scopes-cf.rs:33:14
|
|
|
|
|
LL | let _x = AddFlags(1).get(); //~ ERROR value does not live long enough
|
|
| ^^^^^^^^^^^ - temporary value dropped here while still borrowed
|
|
| |
|
|
| temporary value does not live long enough
|
|
LL | let Box { f: _x } = Box { f: AddFlags(1).get() }; //~ ERROR value does not live long enough
|
|
LL | }
|
|
| - temporary value needs to live until here
|
|
|
|
|
= note: consider using a `let` binding to increase its lifetime
|
|
|
|
error[E0597]: borrowed value does not live long enough
|
|
--> $DIR/cleanup-rvalue-scopes-cf.rs:34:34
|
|
|
|
|
LL | let Box { f: _x } = Box { f: AddFlags(1).get() }; //~ ERROR value does not live long enough
|
|
| ^^^^^^^^^^^ - temporary value dropped here while still borrowed
|
|
| |
|
|
| temporary value does not live long enough
|
|
LL | }
|
|
| - temporary value needs to live until here
|
|
|
|
|
= note: consider using a `let` binding to increase its lifetime
|
|
|
|
error: aborting due to 7 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0597`.
|