Open
Description
trait Trait {
type Assoc;
}
struct W<T>(T);
impl<T: Trait> Trait for W<T> {
type Assoc = T::Assoc;
}
impl Trait for () {
type Assoc = f32;
}
fn foo<T: Trait>(arg: T, x: T::Assoc) -> T::Assoc {
x
}
fn main() {
let w = W(Default::default());
foo(w, 1f32).abs();
let _: W<()> = w;
}
we store <W<_> as Trait>::Assoc => ?unconstrained
in the projection cache and reuse ?unconstrained
for both the input and output. We only do so as normalizing <W<_> as Trait>::Assoc
actually made some progress
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
potentially irrelevant