]> git.proxmox.com Git - rustc.git/blobdiff - src/test/compile-fail/associated-type-projection-from-multiple-supertraits.rs
New upstream version 1.14.0+dfsg1
[rustc.git] / src / test / compile-fail / associated-type-projection-from-multiple-supertraits.rs
index a2a11c62bb83245a851c7158f7dea07901bcb2b9..b33bbfd84258fe88828ebf57e503b00ad57ad0bf 100644 (file)
 
 pub trait Vehicle {
     type Color;
+    //~^ NOTE ambiguous `Color` from `Vehicle`
+    //~| NOTE ambiguous `Color` from `Vehicle`
+    //~| NOTE ambiguous `Color` from `Vehicle`
 
     fn go(&self) {  }
 }
 
 pub trait Box {
     type Color;
-
+    //~^ NOTE ambiguous `Color` from `Box`
+    //~| NOTE ambiguous `Color` from `Box`
+    //~| NOTE ambiguous `Color` from `Box`
+    //
     fn mail(&self) {  }
 }
 
@@ -29,24 +35,18 @@ pub trait BoxCar : Box + Vehicle {
 fn dent<C:BoxCar>(c: C, color: C::Color) {
     //~^ ERROR ambiguous associated type `Color` in bounds of `C`
     //~| NOTE ambiguous associated type `Color`
-    //~| NOTE could derive from `Vehicle`
-    //~| NOTE could derive from `Box`
 }
 
 fn dent_object<COLOR>(c: BoxCar<Color=COLOR>) {
     //~^ ERROR ambiguous associated type
     //~| ERROR the value of the associated type `Color` (from the trait `Vehicle`) must be specified
     //~| NOTE ambiguous associated type `Color`
-    //~| NOTE could derive from `Vehicle`
-    //~| NOTE could derive from `Box`
     //~| NOTE missing associated type `Color` value
 }
 
 fn paint<C:BoxCar>(c: C, d: C::Color) {
     //~^ ERROR ambiguous associated type `Color` in bounds of `C`
     //~| NOTE ambiguous associated type `Color`
-    //~| NOTE could derive from `Vehicle`
-    //~| NOTE could derive from `Box`
 }
 
 pub fn main() { }