Skip to content

wfcheck checks where-clauses post normalization #255

@lcnr

Description

@lcnr

https://github.com/rust-lang/rust/blob/90b65889799733f21ebdf59d96411aa531c5900a/compiler/rustc_hir_analysis/src/check/wfcheck.rs#L1502-L1505

This normalize call is a noop in the new solver. I think we should just slap a deeply_normalize there instead and add a FIXME that we should check where-clauses for WF pre normalization. Though separately, we should do a crater run to see the impact of not normalizing here. The below breakage simply seems desirable to me and idk if there's non desirable breakage


rows 609 and 610, modcholesky crater logs, godbolt

pub struct View<A>(A);
pub trait Data {
    type Elem;
}
impl<'a, A> Data for View<&'a A> {
    type Elem = A;
}

pub fn repro<'a, T>()
where
    <View<&'a T> as Data>::Elem: Sized,
{
}

this breakage looks intended, in the sense that you'd get the same error on the old solver with only the Data bound without looking into the associated type

Metadata

Metadata

Assignees

Labels

from-craterA regression found via a crater run, not part of our test suite

Type

No type

Projects

Status

in progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions