Skip to content

fix false negatives in explicit_outlives_requirements  #54630

Open
@zackmdavis

Description

@zackmdavis

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

No one assigned

    Labels

    A-lifetimesArea: Lifetimes / regionsA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.L-explicit_outlives_requirementsLint: explicit_outlives_requirementsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions