rust/src/test/ui/nll/local-outlives-static-via-hrtb.stderr
Matthew Jasper a962274903 Search for incompatible universes in borrow errors
If we have a borrow that has to live for `'static` we need to check for
any regions in incompatible universes when trying to find the cause.
2019-04-26 22:14:52 +01:00

27 lines
1.0 KiB
Plaintext

error[E0597]: `local` does not live long enough
--> $DIR/local-outlives-static-via-hrtb.rs:24:28
|
LL | assert_static_via_hrtb(&local);
| -----------------------^^^^^^-
| | |
| | borrowed value does not live long enough
| argument requires that `local` is borrowed for `'static`
LL | assert_static_via_hrtb_with_assoc_type(&&local);
LL | }
| - `local` dropped here while still borrowed
error[E0597]: `local` does not live long enough
--> $DIR/local-outlives-static-via-hrtb.rs:25:45
|
LL | assert_static_via_hrtb_with_assoc_type(&&local);
| ----------------------------------------^^^^^^-
| | |
| | borrowed value does not live long enough
| argument requires that `local` is borrowed for `'static`
LL | }
| - `local` dropped here while still borrowed
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0597`.