Skip to content

breakage due to incompletely constraining gat args #202

Open
rust-lang/rust
#140712
@lcnr

Description

@lcnr

might be the cause behind the breakage in deptypes, but I am not sure about that

trait Trait {
    type Assoc<U>;
}

impl<T> Trait for T {
    type Assoc<U> = U;
}

fn ret<T: Trait, U>(x: U) -> <T as Trait>::Assoc<U> {
    loop {}
}

fn foo<T: Trait<Assoc<u32> = u32>, U>() {
    let inf = Default::default();
    let x = ret::<T, _>(inf);
    let _: i32 = inf;
}

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