Skip to content

ignored lifetime constraints in type annotations #115175

Open
@aliemjay

Description

@aliemjay

The following compiles since the full transition to NLL in v1.63, although it shouldn't:

struct Static<T: 'static>(T);
fn test<T>() {
    let _ = None::<Static<T>>;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-NLLArea: Non-lexical lifetimes (NLL)C-bugCategory: This is a bug.NLL-soundWorking towards the "invalid code does not compile" goalP-mediumMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions