Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #12475 - compiler-errors:unelided-lifetime, r=epage
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).
- Loading branch information