fork/rust
git clone https://git.julia.blue/fork/rust
73528e339aa
1.40.0
1error[E0312]: lifetime of reference outlives lifetime of borrowed content... 2 --> $DIR/regions-static-bound.rs:9:5 3 | 4LL | t 5 | ^ 6 | 7 = note: ...the reference is valid for the static lifetime... 8note: ...but the borrowed content is only valid for the lifetime `'a` as defined on the function body at 8:24 9 --> $DIR/regions-static-bound.rs:8:24 10 | 11LL | fn static_id_wrong_way<'a>(t: &'a ()) -> &'static () where 'static: 'a { 12 | ^^ 13 14error[E0621]: explicit lifetime required in the type of `u` 15 --> $DIR/regions-static-bound.rs:14:5 16 | 17LL | fn error(u: &(), v: &()) { 18 | --- help: add explicit lifetime `'static` to the type of `u`: `&'static ()` 19LL | static_id(&u); 20 | ^^^^^^^^^ lifetime `'static` required 21 22error[E0621]: explicit lifetime required in the type of `v` 23 --> $DIR/regions-static-bound.rs:16:5 24 | 25LL | fn error(u: &(), v: &()) { 26 | --- help: add explicit lifetime `'static` to the type of `v`: `&'static ()` 27... 28LL | static_id_indirect(&v); 29 | ^^^^^^^^^^^^^^^^^^ lifetime `'static` required 30 31error: aborting due to 3 previous errors 32 33Some errors have detailed explanations: E0312, E0621. 34For more information about an error, try `rustc --explain E0312`.