blob: fe858d685f7faf6a524305dd3c318c4103eb82a4 [file] [edit]
error[E0106]: missing lifetime specifier
--> $DIR/generic-associated-const.rs:14:29
|
LL | const GAC_LIFETIME<'a>: &str = "";
| ^ expected named lifetime parameter
|
help: consider using the `'a` lifetime
|
LL | const GAC_LIFETIME<'a>: &'a str = "";
| ++
error: `&` without an explicit lifetime name cannot be used here
--> $DIR/generic-associated-const.rs:7:29
|
LL | const GAC_LIFETIME<'a>: &str = "";
| ^
|
note: cannot automatically infer `'static` because of other lifetimes in scope
--> $DIR/generic-associated-const.rs:7:24
|
LL | const GAC_LIFETIME<'a>: &str = "";
| ^^
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #115010 <https://github.com/rust-lang/rust/issues/115010>
note: the lint level is defined here
--> $DIR/generic-associated-const.rs:1:9
|
LL | #![deny(elided_lifetimes_in_associated_constant)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: use the `'static` lifetime
|
LL | const GAC_LIFETIME<'a>: &'static str = "";
| +++++++
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0106`.