2018-08-08 14:28:26 +02:00
|
|
|
error: unsatisfied lifetime constraints
|
|
|
|
--> $DIR/regions-static-bound.rs:19:5
|
|
|
|
|
|
|
|
|
LL | fn static_id_wrong_way<'a>(t: &'a ()) -> &'static () where 'static: 'a {
|
|
|
|
| -- lifetime `'a` defined here
|
|
|
|
LL | t //[ll]~ ERROR E0312
|
2018-08-14 21:26:33 +01:00
|
|
|
| ^ returning this value requires that `'a` must outlive `'static`
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
error[E0621]: explicit lifetime required in the type of `u`
|
2018-08-31 19:27:11 +02:00
|
|
|
--> $DIR/regions-static-bound.rs:24:5
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | fn error(u: &(), v: &()) {
|
|
|
|
| --- help: add explicit lifetime `'static` to the type of `u`: `&'static ()`
|
|
|
|
LL | static_id(&u); //[ll]~ ERROR explicit lifetime required in the type of `u` [E0621]
|
|
|
|
| ^^^^^^^^^^^^^ lifetime `'static` required
|
|
|
|
|
|
|
|
error[E0621]: explicit lifetime required in the type of `v`
|
2018-10-22 11:20:17 -04:00
|
|
|
--> $DIR/regions-static-bound.rs:26:5
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | fn error(u: &(), v: &()) {
|
|
|
|
| --- help: add explicit lifetime `'static` to the type of `v`: `&'static ()`
|
|
|
|
...
|
|
|
|
LL | static_id_indirect(&v); //[ll]~ ERROR explicit lifetime required in the type of `v` [E0621]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ lifetime `'static` required
|
|
|
|
|
2018-10-22 11:20:17 -04:00
|
|
|
error: aborting due to 3 previous errors
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0621`.
|