-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Open
Labels
A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.L-explicit_outlives_requirementsLint: explicit_outlives_requirementsLint: explicit_outlives_requirementsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Niko Matsakis points out that the explicit_outlives_requirements lint (from #53013, expected to land soon) should also fire on lifetime-outlives bounds and associated-type-outlives bounds, as illustrated by the following two examples:
struct Foo<'a, 'b: 'a> {
x: &'a &'b u32
}
struct Bar<'a, T: Iterator> where T::Item: 'a {
item: &'a T::Item,
}
Metadata
Metadata
Assignees
Labels
A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.L-explicit_outlives_requirementsLint: explicit_outlives_requirementsLint: explicit_outlives_requirementsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.