2019-04-22 02:40:08 -05:00
|
|
|
error[E0716]: temporary value dropped while borrowed
|
|
|
|
--> $DIR/cleanup-rvalue-scopes-cf.rs:26:19
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
LL | let x1 = arg(&AddFlags(1));
|
|
|
|
| ^^^^^^^^^^^ - temporary value is freed at the end of this statement
|
2018-08-08 07:28:26 -05:00
|
|
|
| |
|
2022-10-20 10:43:27 -05:00
|
|
|
| creates a temporary value which is freed while still in use
|
2018-08-08 07:28:26 -05:00
|
|
|
...
|
2019-04-22 02:40:08 -05:00
|
|
|
LL | (x1, x2, x3, x4, x5, x6, x7);
|
|
|
|
| -- borrow later used here
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2022-07-14 19:12:01 -05:00
|
|
|
help: consider using a `let` binding to create a longer lived value
|
|
|
|
|
|
|
|
|
LL ~ let binding = AddFlags(1);
|
|
|
|
LL ~ let x1 = arg(&binding);
|
|
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
error[E0716]: temporary value dropped while borrowed
|
|
|
|
--> $DIR/cleanup-rvalue-scopes-cf.rs:27:14
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
LL | let x2 = AddFlags(1).get();
|
|
|
|
| ^^^^^^^^^^^ - temporary value is freed at the end of this statement
|
2018-08-08 07:28:26 -05:00
|
|
|
| |
|
2022-10-20 10:43:27 -05:00
|
|
|
| creates a temporary value which is freed while still in use
|
2018-08-08 07:28:26 -05:00
|
|
|
...
|
2019-04-22 02:40:08 -05:00
|
|
|
LL | (x1, x2, x3, x4, x5, x6, x7);
|
|
|
|
| -- borrow later used here
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2022-07-14 19:12:01 -05:00
|
|
|
help: consider using a `let` binding to create a longer lived value
|
|
|
|
|
|
|
|
|
LL ~ let binding = AddFlags(1);
|
|
|
|
LL ~ let x2 = binding.get();
|
|
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
error[E0716]: temporary value dropped while borrowed
|
|
|
|
--> $DIR/cleanup-rvalue-scopes-cf.rs:28:21
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
LL | let x3 = &*arg(&AddFlags(1));
|
|
|
|
| ^^^^^^^^^^^ - temporary value is freed at the end of this statement
|
2018-08-08 07:28:26 -05:00
|
|
|
| |
|
2022-10-20 10:43:27 -05:00
|
|
|
| creates a temporary value which is freed while still in use
|
2018-08-08 07:28:26 -05:00
|
|
|
...
|
2019-04-22 02:40:08 -05:00
|
|
|
LL | (x1, x2, x3, x4, x5, x6, x7);
|
|
|
|
| -- borrow later used here
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2022-07-14 19:12:01 -05:00
|
|
|
help: consider using a `let` binding to create a longer lived value
|
|
|
|
|
|
|
|
|
LL ~ let binding = AddFlags(1);
|
|
|
|
LL ~ let x3 = &*arg(&binding);
|
|
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
error[E0716]: temporary value dropped while borrowed
|
|
|
|
--> $DIR/cleanup-rvalue-scopes-cf.rs:29:24
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
LL | let ref x4 = *arg(&AddFlags(1));
|
|
|
|
| ^^^^^^^^^^^ - temporary value is freed at the end of this statement
|
2018-08-08 07:28:26 -05:00
|
|
|
| |
|
2022-10-20 10:43:27 -05:00
|
|
|
| creates a temporary value which is freed while still in use
|
2018-08-08 07:28:26 -05:00
|
|
|
...
|
2019-04-22 02:40:08 -05:00
|
|
|
LL | (x1, x2, x3, x4, x5, x6, x7);
|
|
|
|
| -- borrow later used here
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2022-07-14 19:12:01 -05:00
|
|
|
help: consider using a `let` binding to create a longer lived value
|
|
|
|
|
|
|
|
|
LL ~ let binding = AddFlags(1);
|
|
|
|
LL ~ let ref x4 = *arg(&binding);
|
|
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
error[E0716]: temporary value dropped while borrowed
|
|
|
|
--> $DIR/cleanup-rvalue-scopes-cf.rs:30:24
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
LL | let &ref x5 = arg(&AddFlags(1));
|
|
|
|
| ^^^^^^^^^^^ - temporary value is freed at the end of this statement
|
2018-08-08 07:28:26 -05:00
|
|
|
| |
|
2022-10-20 10:43:27 -05:00
|
|
|
| creates a temporary value which is freed while still in use
|
2018-08-08 07:28:26 -05:00
|
|
|
...
|
2019-04-22 02:40:08 -05:00
|
|
|
LL | (x1, x2, x3, x4, x5, x6, x7);
|
|
|
|
| -- borrow later used here
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2022-07-14 19:12:01 -05:00
|
|
|
help: consider using a `let` binding to create a longer lived value
|
|
|
|
|
|
|
|
|
LL ~ let binding = AddFlags(1);
|
|
|
|
LL ~ let &ref x5 = arg(&binding);
|
|
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
error[E0716]: temporary value dropped while borrowed
|
|
|
|
--> $DIR/cleanup-rvalue-scopes-cf.rs:31:14
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
LL | let x6 = AddFlags(1).get();
|
|
|
|
| ^^^^^^^^^^^ - temporary value is freed at the end of this statement
|
2018-08-08 07:28:26 -05:00
|
|
|
| |
|
2022-10-20 10:43:27 -05:00
|
|
|
| creates a temporary value which is freed while still in use
|
2019-04-22 02:40:08 -05:00
|
|
|
...
|
|
|
|
LL | (x1, x2, x3, x4, x5, x6, x7);
|
|
|
|
| -- borrow later used here
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2022-07-14 19:12:01 -05:00
|
|
|
help: consider using a `let` binding to create a longer lived value
|
|
|
|
|
|
|
|
|
LL ~ let binding = AddFlags(1);
|
|
|
|
LL ~ let x6 = binding.get();
|
|
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
error[E0716]: temporary value dropped while borrowed
|
|
|
|
--> $DIR/cleanup-rvalue-scopes-cf.rs:32:44
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
LL | let StackBox { f: x7 } = StackBox { f: AddFlags(1).get() };
|
|
|
|
| ^^^^^^^^^^^ - temporary value is freed at the end of this statement
|
|
|
|
| |
|
2022-10-20 10:43:27 -05:00
|
|
|
| creates a temporary value which is freed while still in use
|
2019-04-22 02:40:08 -05:00
|
|
|
LL |
|
|
|
|
LL | (x1, x2, x3, x4, x5, x6, x7);
|
|
|
|
| -- borrow later used here
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2022-07-14 19:12:01 -05:00
|
|
|
help: consider using a `let` binding to create a longer lived value
|
|
|
|
|
|
|
|
|
LL ~ let binding = AddFlags(1);
|
|
|
|
LL ~ let StackBox { f: x7 } = StackBox { f: binding.get() };
|
|
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error: aborting due to 7 previous errors
|
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
For more information about this error, try `rustc --explain E0716`.
|