Open
Description
https://play.rust-lang.org/?gist=8fb655fdb61666de91bd38bfedb537b6&version=stable&mode=debug
const A: &str = "A"; // defaults to 'static
trait Foo {
const S: &str; // should behave the same
}
impl Foo for () {
const S: &str = "bar";
}
fn main() {}
error[E0106]: missing lifetime specifier
--> src/main.rs:4:11
|
4 | const S: &str; // should behave the same
| ^ expected lifetime parameter
error[E0106]: missing lifetime specifier
--> src/main.rs:8:14
|
8 | const S: &str = "bar";
| ^ expected lifetime parameter