-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-associated-itemsArea: Associated items (types, constants & functions)Area: Associated items (types, constants & functions)A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-langRelevant to the language teamRelevant to the language teamneeds-rfcThis 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.
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
Metadata
Metadata
Assignees
Labels
A-associated-itemsArea: Associated items (types, constants & functions)Area: Associated items (types, constants & functions)A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-langRelevant to the language teamRelevant to the language teamneeds-rfcThis 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.