mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 22:12:15 +00:00
47 lines
1.7 KiB
Plaintext
47 lines
1.7 KiB
Plaintext
|
warning: not reporting region error due to nll
|
||
|
--> $DIR/regions-static-bound.rs:19:5
|
||
|
|
|
||
|
LL | t //[ll]~ ERROR E0312
|
||
|
| ^
|
||
|
|
||
|
warning: not reporting region error due to nll
|
||
|
--> $DIR/regions-static-bound.rs:25:5
|
||
|
|
|
||
|
LL | static_id(&u); //[ll]~ ERROR explicit lifetime required in the type of `u` [E0621]
|
||
|
| ^^^^^^^^^
|
||
|
|
||
|
warning: not reporting region error due to nll
|
||
|
--> $DIR/regions-static-bound.rs:28:5
|
||
|
|
|
||
|
LL | static_id_indirect(&v); //[ll]~ ERROR explicit lifetime required in the type of `v` [E0621]
|
||
|
| ^^^^^^^^^^^^^^^^^^
|
||
|
|
||
|
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
|
||
|
| ^ return requires that `'a` must outlive `'static`
|
||
|
|
||
|
error[E0621]: explicit lifetime required in the type of `u`
|
||
|
--> $DIR/regions-static-bound.rs:25:5
|
||
|
|
|
||
|
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`
|
||
|
--> $DIR/regions-static-bound.rs:28:5
|
||
|
|
|
||
|
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
|
||
|
|
||
|
error: aborting due to 3 previous errors
|
||
|
|
||
|
For more information about this error, try `rustc --explain E0621`.
|