Skip to content

pix regression: env is global after normalization impl shadowing #179

Open
@compiler-errors

Description

@compiler-errors

https://crater-reports.s3.amazonaws.com/pr-133502-2/try%23da0a4799770027c4c578bf48cdb390acfde09023/reg/pix-0.14.0/log.txt

Minimized:

struct NewSolver;
struct OldSolver;

fn foo<T>()
where
    T: Iterator<Item = NewSolver>,
    OldSolver: Into<T::Item>,
{
    let x: OldSolver = OldSolver.into();
}

New solver sees T::Item in where clause, prefers that b/c it mentions params even though it can be normalized, and chooses the OldSolver: Into<NewSolver> impl.

Old solver normalizes param-env, so it sees OldSolver: Into<NewSolver> is global, and chooses the reflexive T: Into<T> impl.

Metadata

Metadata

Labels

A-winnowingfrom-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