blob: d598a4fa763313a97237a672427548f4e523d1f1 [file] [log] [blame]
error[E0373]: closure may outlive the current function, but it borrows `b`, which is owned by the current function
--> $DIR/structural_identity_dependent_reborrows.rs:16:5
|
LL | || {
| ^^ may outlive borrowed value `b`
LL |
LL | expected::<&'a ()>(b);
| - `b` is borrowed here
|
note: closure is returned here
--> $DIR/structural_identity_dependent_reborrows.rs:16:5
|
LL | / || {
LL | |
LL | | expected::<&'a ()>(b);
LL | | }
| |_____^
help: to force the closure to take ownership of `b` (and any other referenced variables), use the `move` keyword
|
LL | move || {
| ++++
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0373`.