-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'static
lifetime not inferred in const
context
#114706
Comments
&'static
lifetime not inferred in const
context'static
lifetime not inferred in const
context
Minimized:
|
|
This is inadvertently introducing early-bound lifetimes for elided lifetimes in associated const params -- that is: impl Foo {
const CONST: &str = "";
} Is desugaring to: impl<'a> Foo<'a> {
const CONST: &'a str = "";
} I don't consider this correct behavior. |
Though I do agree with your assessment @fmease, a PR to make this code pass would require at least a T-lang FCP. I will probably not do that given the opinion stated in the comment you linked. |
I tried this code:
I expected to see this happen: successful compile
Instead, this happened:
Adding some
'static
s fixes it, but I think these are supposed to be unnecessary now:The text was updated successfully, but these errors were encountered: