blob: d6ad68fe94e1e54ddf3cffad795e218dbb688f5d [file] [log] [blame]
error[E0597]: `x` does not live long enough
--> $DIR/region-borrow-params-issue-29793-small.rs:9:34
|
LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| --------- ^ borrowed value does not live long enough
| |
| capture occurs here
...
LL | };
| - borrowed value dropped before borrower
|
= note: values in a scope are dropped in the opposite order they are created
error[E0597]: `y` does not live long enough
--> $DIR/region-borrow-params-issue-29793-small.rs:9:45
|
LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| --------- ^ borrowed value does not live long enough
| |
| capture occurs here
...
LL | };
| - borrowed value dropped before borrower
|
= note: values in a scope are dropped in the opposite order they are created
error[E0597]: `x` does not live long enough
--> $DIR/region-borrow-params-issue-29793-small.rs:24:34
|
LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| --------- ^ borrowed value does not live long enough
| |
| capture occurs here
...
LL | };
| - borrowed value dropped before borrower
|
= note: values in a scope are dropped in the opposite order they are created
error[E0597]: `y` does not live long enough
--> $DIR/region-borrow-params-issue-29793-small.rs:24:45
|
LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| --------- ^ borrowed value does not live long enough
| |
| capture occurs here
...
LL | };
| - borrowed value dropped before borrower
|
= note: values in a scope are dropped in the opposite order they are created
error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
--> $DIR/region-borrow-params-issue-29793-small.rs:55:17
|
LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^ - `x` is borrowed here
| |
| may outlive borrowed value `x`
help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
|
LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^^^^^^
error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function
--> $DIR/region-borrow-params-issue-29793-small.rs:55:17
|
LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^ - `y` is borrowed here
| |
| may outlive borrowed value `y`
help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword
|
LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^^^^^^
error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
--> $DIR/region-borrow-params-issue-29793-small.rs:66:17
|
LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^ - `x` is borrowed here
| |
| may outlive borrowed value `x`
help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
|
LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^^^^^^
error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function
--> $DIR/region-borrow-params-issue-29793-small.rs:66:17
|
LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^ - `y` is borrowed here
| |
| may outlive borrowed value `y`
help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword
|
LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^^^^^^
error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
--> $DIR/region-borrow-params-issue-29793-small.rs:90:21
|
LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^ - `x` is borrowed here
| |
| may outlive borrowed value `x`
help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
|
LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^^^^^^
error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function
--> $DIR/region-borrow-params-issue-29793-small.rs:90:21
|
LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^ - `y` is borrowed here
| |
| may outlive borrowed value `y`
help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword
|
LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^^^^^^
error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
--> $DIR/region-borrow-params-issue-29793-small.rs:104:21
|
LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^ - `x` is borrowed here
| |
| may outlive borrowed value `x`
help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
|
LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^^^^^^
error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function
--> $DIR/region-borrow-params-issue-29793-small.rs:104:21
|
LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^ - `y` is borrowed here
| |
| may outlive borrowed value `y`
help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword
|
LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^^^^^^
error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
--> $DIR/region-borrow-params-issue-29793-small.rs:132:21
|
LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^ - `x` is borrowed here
| |
| may outlive borrowed value `x`
help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
|
LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^^^^^^
error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function
--> $DIR/region-borrow-params-issue-29793-small.rs:132:21
|
LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^ - `y` is borrowed here
| |
| may outlive borrowed value `y`
help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword
|
LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^^^^^^
error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
--> $DIR/region-borrow-params-issue-29793-small.rs:147:21
|
LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^ - `x` is borrowed here
| |
| may outlive borrowed value `x`
help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
|
LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^^^^^^
error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function
--> $DIR/region-borrow-params-issue-29793-small.rs:147:21
|
LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^ - `y` is borrowed here
| |
| may outlive borrowed value `y`
help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword
|
LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^^^^^^
error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
--> $DIR/region-borrow-params-issue-29793-small.rs:175:21
|
LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^ - `x` is borrowed here
| |
| may outlive borrowed value `x`
help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
|
LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^^^^^^
error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function
--> $DIR/region-borrow-params-issue-29793-small.rs:175:21
|
LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^ - `y` is borrowed here
| |
| may outlive borrowed value `y`
help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword
|
LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^^^^^^
error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
--> $DIR/region-borrow-params-issue-29793-small.rs:189:21
|
LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^ - `x` is borrowed here
| |
| may outlive borrowed value `x`
help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
|
LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^^^^^^
error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function
--> $DIR/region-borrow-params-issue-29793-small.rs:189:21
|
LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^ - `y` is borrowed here
| |
| may outlive borrowed value `y`
help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword
|
LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
| ^^^^^^^^^^^^^^
error: aborting due to 20 previous errors
Some errors occurred: E0373, E0597.
For more information about an error, try `rustc --explain E0373`.