-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Don't allow consts with unconstrained lifetimes in their types #114713
Don't allow consts with unconstrained lifetimes in their types #114713
Conversation
r? @wesleywiser (rustbot has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit e179d5d with merge 216f55af8dc8a43a1f76405446110a5ac597fc81... |
Will re-assign to T-types when crater is done. |
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
Fix elided lifetime in associated const Fix an unelided lifetime in an associated const. The old code was equivalent to: ```rust impl<'a> RegistryConfig { /// File name of [`RegistryConfig`]. const NAME: &'a str = "config.json"; } ``` and not `&'static str`, as it might be in a regular `const` item. This "regressed" in rust-lang/rust#97313, which started allowing this behavior (inadvertently, as far as I can tell). It's not necessarily clear to me that this is sound (or at least, it's not something we intended to be able to express), but it's also preventing me from doing crater runs to investigate fallout of this issue (rust-lang/rust#114713 and rust-lang/rust#114716).
I guess this is not necessarily unsound. But I'd still like to crater this, but that's blocked on a cargo sync. |
This one probably doesn't actually matter. |
Let's not do that.
cc #114706