Handle multiple trait-def projection candidates
This commit is contained in:
parent
0dfa6ff3be
commit
ed32482534
2 changed files with 23 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
|||
// Check that if we have multiple applicable projection bounds we pick one (for
|
||||
// backwards compatibility reasons).
|
||||
|
||||
// check-pass
|
||||
use std::ops::Mul;
|
||||
|
||||
trait A {
|
||||
type V;
|
||||
type U: Mul<Self::V, Output = ()> + Mul<(), Output = ()>;
|
||||
}
|
||||
|
||||
fn g<T: A<V = ()>>() {
|
||||
let y: <T::U as Mul<()>>::Output = ();
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue