We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
it is possible to have multiple blanket impls whose disjointness is guaranteed by a projection super bound:
trait Trait { type Assoc; } trait Foo: Trait<Assoc = u32> {} trait Bar: Trait<Assoc = String> {} trait TwoBlankets { fn method(); } mod blanket_impls { use super::*; trait Helper<A> { fn method(); } impl<T: Trait + Helper<T::Assoc>> TwoBlankets for T { fn method() { <T as Helper<T::Assoc>>::method() } } impl<T: Foo> Helper<u32> for T { fn method() { println!("Foo"); } } impl<T: Bar> Helper<String> for T { fn method() { println!("Bar"); } } }
first seen in rust-lang/rfcs#1672 (comment)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
it is possible to have multiple blanket impls whose disjointness is guaranteed by a projection super bound:
first seen in rust-lang/rfcs#1672 (comment)
The text was updated successfully, but these errors were encountered: