about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorNick Cameron <ncameron@mozilla.com>2015-04-10 12:25:40 +1200
committerNick Cameron <ncameron@mozilla.com>2015-04-14 21:55:42 +1200
commit73c2e768d6ba55bdfb8292320ebac00e69ca2e42 (patch)
treefb6f8a5f718bcaa8729d21a4f2526604a17d8994 /src/test
parent4e8e64140ff60d1a20d7e54369db714a9fcd8b96 (diff)
downloadrust-73c2e768d6ba55bdfb8292320ebac00e69ca2e42.tar.gz
rust-73c2e768d6ba55bdfb8292320ebac00e69ca2e42.zip
Rebased
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/associated-type-projection-from-multiple-supertraits.rs5
-rw-r--r--src/test/compile-fail/issue-22560.rs1
-rw-r--r--src/test/run-make/save-analysis/foo.rs6
3 files changed, 7 insertions, 5 deletions
diff --git a/src/test/compile-fail/associated-type-projection-from-multiple-supertraits.rs b/src/test/compile-fail/associated-type-projection-from-multiple-supertraits.rs
index c18d72c445b..2b34fcab24c 100644
--- a/src/test/compile-fail/associated-type-projection-from-multiple-supertraits.rs
+++ b/src/test/compile-fail/associated-type-projection-from-multiple-supertraits.rs
@@ -34,8 +34,9 @@ fn dent<C:BoxCar>(c: C, color: C::Color) {
 
 fn dent_object<COLOR>(c: BoxCar<Color=COLOR>) {
     //~^ ERROR ambiguous associated type
-    //~| ERROR the associated type `Color` (from the trait `Box`) must be specified
-    //~| ERROR the associated type `Color` (from the trait `Vehicle`) must be specified
+    //~| ERROR the value of the associated type `Color` (from the trait `Vehicle`) must be specified
+    //~| NOTE could derive from `Vehicle`
+    //~| NOTE could derive from `Box`
 }
 
 fn paint<C:BoxCar>(c: C, d: C::Color) {
diff --git a/src/test/compile-fail/issue-22560.rs b/src/test/compile-fail/issue-22560.rs
index b458e10a89c..a05bbe4960e 100644
--- a/src/test/compile-fail/issue-22560.rs
+++ b/src/test/compile-fail/issue-22560.rs
@@ -14,6 +14,7 @@ use std::ops::{Add, Sub};
 
 type Test = Add +
             //~^ ERROR the type parameter `RHS` must be explicitly specified in an object type because its default value `Self` references the type `Self`
+            //~^^ ERROR the value of the associated type `Output` (from the trait `core::ops::Add`) must be specified [E0191]
             Sub;
             //~^ ERROR only the builtin traits can be used as closure or object bounds
 
diff --git a/src/test/run-make/save-analysis/foo.rs b/src/test/run-make/save-analysis/foo.rs
index 9d1ab00359d..56da6693939 100644
--- a/src/test/run-make/save-analysis/foo.rs
+++ b/src/test/run-make/save-analysis/foo.rs
@@ -10,7 +10,7 @@
 
 #![ crate_name = "test" ]
 #![allow(unstable)]
-#![feature(box_syntax, old_io, rustc_private, core)]
+#![feature(box_syntax, old_io, rustc_private, core, zero_one)]
 
 extern crate graphviz;
 // A simple rust project
@@ -25,7 +25,7 @@ use std::old_io::stdio::println;
 use sub::sub2 as msalias;
 use sub::sub2;
 use sub::sub2::nested_struct as sub_struct;
-use std::num::Float;
+use std::num::One;
 use std::num::cast;
 use std::num::{from_int,from_i8,from_i32};
 
@@ -42,7 +42,7 @@ fn test_alias<I: Iterator>(i: Option<<I as Iterator>::Item>) {
     let s = sub_struct{ field2: 45, };
 
     // import tests
-    fn foo(x: &Float) {}
+    fn foo(x: &One) {}
     let _: Option<u8> = from_i32(45);
 
     let x = 42;