| error[E0597]: `short1` does not live long enough |
| --> $DIR/let-else-more-permissive.rs:13:19 |
| | |
| LL | let (mut long1, short1) = (Struct(&0), 1); |
| | ------ binding `short1` declared here |
| LL | long1.0 = &short1; |
| | ^^^^^^^ borrowed value does not live long enough |
| LL | |
| LL | } |
| | - |
| | | |
| | `short1` dropped here while still borrowed |
| | borrow might be used here, when `long1` is dropped and runs the `Drop` code for type `Struct` |
| | |
| = note: values in a scope are dropped in the opposite order they are defined |
| |
| error[E0597]: `short2` does not live long enough |
| --> $DIR/let-else-more-permissive.rs:20:19 |
| | |
| LL | let (mut long2, short2) = (Struct(&0), 1) else { unreachable!() }; |
| | ------ binding `short2` declared here |
| LL | long2.0 = &short2; |
| | ^^^^^^^ borrowed value does not live long enough |
| LL | |
| LL | } |
| | - |
| | | |
| | `short2` dropped here while still borrowed |
| | borrow might be used here, when `long2` is dropped and runs the `Drop` code for type `Struct` |
| | |
| = note: values in a scope are dropped in the opposite order they are defined |
| |
| error[E0597]: `short3` does not live long enough |
| --> $DIR/let-else-more-permissive.rs:28:19 |
| | |
| LL | let (mut long3, short3) = (Struct(&tmp), Box::new(1)) else { unreachable!() }; |
| | ------ binding `short3` declared here |
| LL | long3.0 = &short3; |
| | ^^^^^^^ borrowed value does not live long enough |
| LL | |
| LL | } |
| | - |
| | | |
| | `short3` dropped here while still borrowed |
| | borrow might be used here, when `long3` is dropped and runs the `Drop` code for type `Struct` |
| | |
| = note: values in a scope are dropped in the opposite order they are defined |
| |
| error: aborting due to 3 previous errors |
| |
| For more information about this error, try `rustc --explain E0597`. |