Skip to content

Commit ce0eeee

Browse files
Rollup merge of #115011 - compiler-errors:warn-on-elided-assoc-ct-lt, r=cjgillot
Warn on elided lifetimes in associated constants (`ELIDED_LIFETIMES_IN_ASSOCIATED_CONSTANT`) Elided lifetimes in associated constants (in impls) erroneously resolve to fresh lifetime parameters on the impl since #97313. This is not correct behavior (see #38831). I originally opened #114716 to fix this, but given the time that has passed, the crater results seem pretty bad: #114716 (comment) This PR alternatively implements a lint against this behavior, and I'm hoping to bump this to deny in a few versions.
2 parents 30d8aa1 + 7012fff commit ce0eeee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/test-utils/src/fixture.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ impl FixtureWithProjectMeta {
313313
}
314314

315315
impl MiniCore {
316-
const RAW_SOURCE: &str = include_str!("./minicore.rs");
316+
const RAW_SOURCE: &'static str = include_str!("./minicore.rs");
317317

318318
fn has_flag(&self, flag: &str) -> bool {
319319
self.activated_flags.iter().any(|it| it == flag)

0 commit comments

Comments
 (0)