Skip to content

ignored regions constraints when normalizing user-provided types  #101350

Closed
@aliemjay

Description

@aliemjay

This compiles after full NLL (>= 1.63) but it shouldn't:

trait Trait {
    type Ty;
}

impl Trait for &'static () {
    type Ty = ();
}

fn extend<'a>() {
    None::<<&'a () as Trait>::Ty>;
}

HIR typeck unconditionally normalizes user-provided types modulo regions, so it's not NLL's fault this time :)

@rustbot label regression-from-stable-to-stable T-compiler T-types C-bug

Metadata

Metadata

Assignees

Labels

C-bugCategory: This is a bug.P-highHigh priorityS-bug-has-testStatus: This bug is tracked inside the repo by a `known-bug` test.T-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