Open
Description
openedon Jun 5, 2018
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
Area: Associated items (types, constants & functions)Area: Associated items (types, constants & functions)Area: Lifetimes / regionsArea: Lifetimes / regionsCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.Relevant to the language team, which will review and decide on the PR/issue.Relevant to the language team, which will review and decide on the PR/issue.This change is large or controversial enough that it should have an RFC accepted before doing it.This change is large or controversial enough that it should have an RFC accepted before doing it.