-error[E0597]: borrowed value does not live long enough
- --> $DIR/cleanup-rvalue-scopes-cf.rs:28:19
+error[E0716]: temporary value dropped while borrowed
+ --> $DIR/cleanup-rvalue-scopes-cf.rs:26:19
|
-LL | let _x = arg(&AddFlags(1));
- | ^^^^^^^^^^^ - temporary value dropped here while still borrowed
+LL | let x1 = arg(&AddFlags(1));
+ | ^^^^^^^^^^^ - temporary value is freed at the end of this statement
| |
- | temporary value does not live long enough
+ | creates a temporary which is freed while still in use
...
-LL | }
- | - temporary value needs to live until here
+LL | (x1, x2, x3, x4, x5, x6, x7);
+ | -- borrow later used here
|
- = note: consider using a `let` binding to increase its lifetime
+ = note: consider using a `let` binding to create a longer lived value
-error[E0597]: borrowed value does not live long enough
- --> $DIR/cleanup-rvalue-scopes-cf.rs:29:14
+error[E0716]: temporary value dropped while borrowed
+ --> $DIR/cleanup-rvalue-scopes-cf.rs:27:14
|
-LL | let _x = AddFlags(1).get();
- | ^^^^^^^^^^^ - temporary value dropped here while still borrowed
+LL | let x2 = AddFlags(1).get();
+ | ^^^^^^^^^^^ - temporary value is freed at the end of this statement
| |
- | temporary value does not live long enough
+ | creates a temporary which is freed while still in use
...
-LL | }
- | - temporary value needs to live until here
+LL | (x1, x2, x3, x4, x5, x6, x7);
+ | -- borrow later used here
|
- = note: consider using a `let` binding to increase its lifetime
+ = note: consider using a `let` binding to create a longer lived value
-error[E0597]: borrowed value does not live long enough
- --> $DIR/cleanup-rvalue-scopes-cf.rs:30:21
+error[E0716]: temporary value dropped while borrowed
+ --> $DIR/cleanup-rvalue-scopes-cf.rs:28:21
|
-LL | let _x = &*arg(&AddFlags(1));
- | ^^^^^^^^^^^ - temporary value dropped here while still borrowed
+LL | let x3 = &*arg(&AddFlags(1));
+ | ^^^^^^^^^^^ - temporary value is freed at the end of this statement
| |
- | temporary value does not live long enough
+ | creates a temporary which is freed while still in use
...
-LL | }
- | - temporary value needs to live until here
+LL | (x1, x2, x3, x4, x5, x6, x7);
+ | -- borrow later used here
|
- = note: consider using a `let` binding to increase its lifetime
+ = note: consider using a `let` binding to create a longer lived value
-error[E0597]: borrowed value does not live long enough
- --> $DIR/cleanup-rvalue-scopes-cf.rs:31:24
+error[E0716]: temporary value dropped while borrowed
+ --> $DIR/cleanup-rvalue-scopes-cf.rs:29:24
|
-LL | let ref _x = *arg(&AddFlags(1));
- | ^^^^^^^^^^^ - temporary value dropped here while still borrowed
+LL | let ref x4 = *arg(&AddFlags(1));
+ | ^^^^^^^^^^^ - temporary value is freed at the end of this statement
| |
- | temporary value does not live long enough
+ | creates a temporary which is freed while still in use
...
-LL | }
- | - temporary value needs to live until here
+LL | (x1, x2, x3, x4, x5, x6, x7);
+ | -- borrow later used here
|
- = note: consider using a `let` binding to increase its lifetime
+ = note: consider using a `let` binding to create a longer lived value
-error[E0597]: borrowed value does not live long enough
- --> $DIR/cleanup-rvalue-scopes-cf.rs:32:24
+error[E0716]: temporary value dropped while borrowed
+ --> $DIR/cleanup-rvalue-scopes-cf.rs:30:24
|
-LL | let &ref _x = arg(&AddFlags(1));
- | ^^^^^^^^^^^ - temporary value dropped here while still borrowed
+LL | let &ref x5 = arg(&AddFlags(1));
+ | ^^^^^^^^^^^ - temporary value is freed at the end of this statement
| |
- | temporary value does not live long enough
+ | creates a temporary which is freed while still in use
...
-LL | }
- | - temporary value needs to live until here
+LL | (x1, x2, x3, x4, x5, x6, x7);
+ | -- borrow later used here
|
- = note: consider using a `let` binding to increase its lifetime
+ = note: consider using a `let` binding to create a longer lived value
-error[E0597]: borrowed value does not live long enough
- --> $DIR/cleanup-rvalue-scopes-cf.rs:33:14
+error[E0716]: temporary value dropped while borrowed
+ --> $DIR/cleanup-rvalue-scopes-cf.rs:31:14
|
-LL | let _x = AddFlags(1).get();
- | ^^^^^^^^^^^ - temporary value dropped here while still borrowed
+LL | let x6 = AddFlags(1).get();
+ | ^^^^^^^^^^^ - temporary value is freed at the end of this statement
| |
- | temporary value does not live long enough
-LL | let Box { f: _x } = Box { f: AddFlags(1).get() };
-LL | }
- | - temporary value needs to live until here
+ | creates a temporary which is freed while still in use
+...
+LL | (x1, x2, x3, x4, x5, x6, x7);
+ | -- borrow later used here
|
- = note: consider using a `let` binding to increase its lifetime
+ = note: consider using a `let` binding to create a longer lived value
-error[E0597]: borrowed value does not live long enough
- --> $DIR/cleanup-rvalue-scopes-cf.rs:34:34
+error[E0716]: temporary value dropped while borrowed
+ --> $DIR/cleanup-rvalue-scopes-cf.rs:32:44
|
-LL | let Box { f: _x } = Box { f: AddFlags(1).get() };
- | ^^^^^^^^^^^ - temporary value dropped here while still borrowed
- | |
- | temporary value does not live long enough
-LL | }
- | - temporary value needs to live until here
+LL | let StackBox { f: x7 } = StackBox { f: AddFlags(1).get() };
+ | ^^^^^^^^^^^ - temporary value is freed at the end of this statement
+ | |
+ | creates a temporary which is freed while still in use
+LL |
+LL | (x1, x2, x3, x4, x5, x6, x7);
+ | -- borrow later used here
|
- = note: consider using a `let` binding to increase its lifetime
+ = note: consider using a `let` binding to create a longer lived value
error: aborting due to 7 previous errors
-For more information about this error, try `rustc --explain E0597`.
+For more information about this error, try `rustc --explain E0716`.