rust-lang / impl-trait-utils

Utilities for working with impl traits in Rust.
Apache License 2.0
89 stars 9 forks source link

associated types with generic bounds not in where clause won't compile #25

Closed bsh98 closed 7 months ago

bsh98 commented 8 months ago

For example, the following trait compiles

#[trait_variant::make(TestTrait: Send)]
pub trait LocalTestTrait{
    type B<T>: FromIterator<T> where T: Display;
    // --snip--
}

but this one does not compile

#[trait_variant::make(TestTrait: Send)]
pub trait LocalTestTrait{
    type B<T: Display>: FromIterator<T>;
    // --snip--
}

even though they are equivalent.