about summary refs log tree commit diff
path: root/src/test/ui/error-codes
diff options
context:
space:
mode:
authormemoryruins <memoryruinsmusic@gmail.com>2019-05-28 14:46:13 -0400
committermemoryruins <memoryruinsmusic@gmail.com>2019-05-29 00:57:31 -0400
commiteb4580a570069175e1290b294d91042a09f9fde3 (patch)
treefdb0ef28968512495204bd7a3dc3253cdb20365a /src/test/ui/error-codes
parenta1d1d7a2c696c2afeff2ea206621a32d77fa49dc (diff)
downloadrust-eb4580a570069175e1290b294d91042a09f9fde3.tar.gz
rust-eb4580a570069175e1290b294d91042a09f9fde3.zip
Update ui test suite to use dyn
Diffstat (limited to 'src/test/ui/error-codes')
-rw-r--r--src/test/ui/error-codes/E0033-teach.rs2
-rw-r--r--src/test/ui/error-codes/E0033-teach.stderr10
-rw-r--r--src/test/ui/error-codes/E0033.rs2
-rw-r--r--src/test/ui/error-codes/E0033.stderr10
-rw-r--r--src/test/ui/error-codes/E0038.rs2
-rw-r--r--src/test/ui/error-codes/E0038.stderr4
-rw-r--r--src/test/ui/error-codes/E0120.rs2
-rw-r--r--src/test/ui/error-codes/E0120.stderr4
-rw-r--r--src/test/ui/error-codes/E0191.rs2
-rw-r--r--src/test/ui/error-codes/E0191.stderr4
-rw-r--r--src/test/ui/error-codes/E0220.rs4
-rw-r--r--src/test/ui/error-codes/E0220.stderr10
-rw-r--r--src/test/ui/error-codes/E0393.rs2
-rw-r--r--src/test/ui/error-codes/E0393.stderr6
-rw-r--r--src/test/ui/error-codes/E0478.rs2
-rw-r--r--src/test/ui/error-codes/E0478.stderr4
-rw-r--r--src/test/ui/error-codes/E0719.rs4
-rw-r--r--src/test/ui/error-codes/E0719.stderr10
18 files changed, 42 insertions, 42 deletions
diff --git a/src/test/ui/error-codes/E0033-teach.rs b/src/test/ui/error-codes/E0033-teach.rs
index 0f0b8d864dc..6a27b07fa8b 100644
--- a/src/test/ui/error-codes/E0033-teach.rs
+++ b/src/test/ui/error-codes/E0033-teach.rs
@@ -5,7 +5,7 @@ trait SomeTrait {
 }
 
 fn main() {
-    let trait_obj: &SomeTrait = SomeTrait;
+    let trait_obj: &dyn SomeTrait = SomeTrait;
     //~^ ERROR expected value, found trait `SomeTrait`
     //~| ERROR E0038
     //~| method `foo` has no receiver
diff --git a/src/test/ui/error-codes/E0033-teach.stderr b/src/test/ui/error-codes/E0033-teach.stderr
index 1b78820cae0..fb630de7fc1 100644
--- a/src/test/ui/error-codes/E0033-teach.stderr
+++ b/src/test/ui/error-codes/E0033-teach.stderr
@@ -1,14 +1,14 @@
 error[E0423]: expected value, found trait `SomeTrait`
-  --> $DIR/E0033-teach.rs:8:33
+  --> $DIR/E0033-teach.rs:8:37
    |
-LL |     let trait_obj: &SomeTrait = SomeTrait;
-   |                                 ^^^^^^^^^ not a value
+LL |     let trait_obj: &dyn SomeTrait = SomeTrait;
+   |                                     ^^^^^^^^^ not a value
 
 error[E0038]: the trait `SomeTrait` cannot be made into an object
   --> $DIR/E0033-teach.rs:8:20
    |
-LL |     let trait_obj: &SomeTrait = SomeTrait;
-   |                    ^^^^^^^^^^ the trait `SomeTrait` cannot be made into an object
+LL |     let trait_obj: &dyn SomeTrait = SomeTrait;
+   |                    ^^^^^^^^^^^^^^ the trait `SomeTrait` cannot be made into an object
    |
    = note: method `foo` has no receiver
 
diff --git a/src/test/ui/error-codes/E0033.rs b/src/test/ui/error-codes/E0033.rs
index 5a4f3cbce60..582600e110b 100644
--- a/src/test/ui/error-codes/E0033.rs
+++ b/src/test/ui/error-codes/E0033.rs
@@ -3,7 +3,7 @@ trait SomeTrait {
 }
 
 fn main() {
-    let trait_obj: &SomeTrait = SomeTrait;
+    let trait_obj: &dyn SomeTrait = SomeTrait;
     //~^ ERROR expected value, found trait `SomeTrait`
     //~| ERROR E0038
     //~| method `foo` has no receiver
diff --git a/src/test/ui/error-codes/E0033.stderr b/src/test/ui/error-codes/E0033.stderr
index 976b0e0286f..fe9f45d86a6 100644
--- a/src/test/ui/error-codes/E0033.stderr
+++ b/src/test/ui/error-codes/E0033.stderr
@@ -1,14 +1,14 @@
 error[E0423]: expected value, found trait `SomeTrait`
-  --> $DIR/E0033.rs:6:33
+  --> $DIR/E0033.rs:6:37
    |
-LL |     let trait_obj: &SomeTrait = SomeTrait;
-   |                                 ^^^^^^^^^ not a value
+LL |     let trait_obj: &dyn SomeTrait = SomeTrait;
+   |                                     ^^^^^^^^^ not a value
 
 error[E0038]: the trait `SomeTrait` cannot be made into an object
   --> $DIR/E0033.rs:6:20
    |
-LL |     let trait_obj: &SomeTrait = SomeTrait;
-   |                    ^^^^^^^^^^ the trait `SomeTrait` cannot be made into an object
+LL |     let trait_obj: &dyn SomeTrait = SomeTrait;
+   |                    ^^^^^^^^^^^^^^ the trait `SomeTrait` cannot be made into an object
    |
    = note: method `foo` has no receiver
 
diff --git a/src/test/ui/error-codes/E0038.rs b/src/test/ui/error-codes/E0038.rs
index b2226803da7..9757e2ab10c 100644
--- a/src/test/ui/error-codes/E0038.rs
+++ b/src/test/ui/error-codes/E0038.rs
@@ -2,7 +2,7 @@ trait Trait {
     fn foo(&self) -> Self;
 }
 
-fn call_foo(x: Box<Trait>) {
+fn call_foo(x: Box<dyn Trait>) {
     //~^ ERROR E0038
     let y = x.foo();
 }
diff --git a/src/test/ui/error-codes/E0038.stderr b/src/test/ui/error-codes/E0038.stderr
index 74b77338c85..e3d7593e42a 100644
--- a/src/test/ui/error-codes/E0038.stderr
+++ b/src/test/ui/error-codes/E0038.stderr
@@ -1,8 +1,8 @@
 error[E0038]: the trait `Trait` cannot be made into an object
   --> $DIR/E0038.rs:5:1
    |
-LL | fn call_foo(x: Box<Trait>) {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` cannot be made into an object
+LL | fn call_foo(x: Box<dyn Trait>) {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` cannot be made into an object
    |
    = note: method `foo` references the `Self` type in its arguments or return type
 
diff --git a/src/test/ui/error-codes/E0120.rs b/src/test/ui/error-codes/E0120.rs
index 049707415e5..287a4088183 100644
--- a/src/test/ui/error-codes/E0120.rs
+++ b/src/test/ui/error-codes/E0120.rs
@@ -1,6 +1,6 @@
 trait MyTrait { fn foo() {} }
 
-impl Drop for MyTrait {
+impl Drop for dyn MyTrait {
               //~^ ERROR E0120
     fn drop(&mut self) {}
 }
diff --git a/src/test/ui/error-codes/E0120.stderr b/src/test/ui/error-codes/E0120.stderr
index 9b6603dbaca..68ca7d800d5 100644
--- a/src/test/ui/error-codes/E0120.stderr
+++ b/src/test/ui/error-codes/E0120.stderr
@@ -1,8 +1,8 @@
 error[E0120]: the Drop trait may only be implemented on structures
   --> $DIR/E0120.rs:3:15
    |
-LL | impl Drop for MyTrait {
-   |               ^^^^^^^ implementing Drop requires a struct
+LL | impl Drop for dyn MyTrait {
+   |               ^^^^^^^^^^^ implementing Drop requires a struct
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/error-codes/E0191.rs b/src/test/ui/error-codes/E0191.rs
index 356110671e7..22f739b9e76 100644
--- a/src/test/ui/error-codes/E0191.rs
+++ b/src/test/ui/error-codes/E0191.rs
@@ -2,6 +2,6 @@ trait Trait {
     type Bar;
 }
 
-type Foo = Trait; //~ ERROR E0191
+type Foo = dyn Trait; //~ ERROR E0191
 
 fn main() {}
diff --git a/src/test/ui/error-codes/E0191.stderr b/src/test/ui/error-codes/E0191.stderr
index 2d9fdfe5d29..92fa85bca0e 100644
--- a/src/test/ui/error-codes/E0191.stderr
+++ b/src/test/ui/error-codes/E0191.stderr
@@ -4,8 +4,8 @@ error[E0191]: the value of the associated type `Bar` (from the trait `Trait`) mu
 LL |     type Bar;
    |     --------- `Bar` defined here
 ...
-LL | type Foo = Trait;
-   |            ^^^^^ associated type `Bar` must be specified
+LL | type Foo = dyn Trait;
+   |            ^^^^^^^^^ associated type `Bar` must be specified
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/error-codes/E0220.rs b/src/test/ui/error-codes/E0220.rs
index f4798042538..e11a570df79 100644
--- a/src/test/ui/error-codes/E0220.rs
+++ b/src/test/ui/error-codes/E0220.rs
@@ -2,7 +2,7 @@ trait Trait {
     type Bar;
 }
 
-type Foo = Trait<F=i32>; //~ ERROR E0220
-                         //~| ERROR E0191
+type Foo = dyn Trait<F=i32>; //~ ERROR E0220
+                             //~| ERROR E0191
 fn main() {
 }
diff --git a/src/test/ui/error-codes/E0220.stderr b/src/test/ui/error-codes/E0220.stderr
index bd2205fb752..5da302748cd 100644
--- a/src/test/ui/error-codes/E0220.stderr
+++ b/src/test/ui/error-codes/E0220.stderr
@@ -1,8 +1,8 @@
 error[E0220]: associated type `F` not found for `Trait`
-  --> $DIR/E0220.rs:5:18
+  --> $DIR/E0220.rs:5:22
    |
-LL | type Foo = Trait<F=i32>;
-   |                  ^^^^^ associated type `F` not found
+LL | type Foo = dyn Trait<F=i32>;
+   |                      ^^^^^ associated type `F` not found
 
 error[E0191]: the value of the associated type `Bar` (from the trait `Trait`) must be specified
   --> $DIR/E0220.rs:5:12
@@ -10,8 +10,8 @@ error[E0191]: the value of the associated type `Bar` (from the trait `Trait`) mu
 LL |     type Bar;
    |     --------- `Bar` defined here
 ...
-LL | type Foo = Trait<F=i32>;
-   |            ^^^^^^^^^^^^ associated type `Bar` must be specified
+LL | type Foo = dyn Trait<F=i32>;
+   |            ^^^^^^^^^^^^^^^^ associated type `Bar` must be specified
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/error-codes/E0393.rs b/src/test/ui/error-codes/E0393.rs
index bdd4deafc83..0c1a369806d 100644
--- a/src/test/ui/error-codes/E0393.rs
+++ b/src/test/ui/error-codes/E0393.rs
@@ -1,6 +1,6 @@
 trait A<T=Self> {}
 
-fn together_we_will_rule_the_galaxy(son: &A) {}
+fn together_we_will_rule_the_galaxy(son: &dyn A) {}
 //~^ ERROR E0393
 
 fn main() {
diff --git a/src/test/ui/error-codes/E0393.stderr b/src/test/ui/error-codes/E0393.stderr
index bf564ef1021..543e3213633 100644
--- a/src/test/ui/error-codes/E0393.stderr
+++ b/src/test/ui/error-codes/E0393.stderr
@@ -1,8 +1,8 @@
 error[E0393]: the type parameter `T` must be explicitly specified
-  --> $DIR/E0393.rs:3:43
+  --> $DIR/E0393.rs:3:47
    |
-LL | fn together_we_will_rule_the_galaxy(son: &A) {}
-   |                                           ^ missing reference to `T`
+LL | fn together_we_will_rule_the_galaxy(son: &dyn A) {}
+   |                                               ^ missing reference to `T`
    |
    = note: because of the default `Self` reference, type parameters must be specified on object types
 
diff --git a/src/test/ui/error-codes/E0478.rs b/src/test/ui/error-codes/E0478.rs
index 1b5ca09d5a6..b1562dc0a8b 100644
--- a/src/test/ui/error-codes/E0478.rs
+++ b/src/test/ui/error-codes/E0478.rs
@@ -1,7 +1,7 @@
 trait Wedding<'t>: 't { }
 
 struct Prince<'kiss, 'SnowWhite> {
-    child: Box<Wedding<'kiss> + 'SnowWhite>, //~ ERROR E0478
+    child: Box<dyn Wedding<'kiss> + 'SnowWhite>, //~ ERROR E0478
 }
 
 fn main() {
diff --git a/src/test/ui/error-codes/E0478.stderr b/src/test/ui/error-codes/E0478.stderr
index 71e490364d7..587125fdc33 100644
--- a/src/test/ui/error-codes/E0478.stderr
+++ b/src/test/ui/error-codes/E0478.stderr
@@ -1,8 +1,8 @@
 error[E0478]: lifetime bound not satisfied
   --> $DIR/E0478.rs:4:5
    |
-LL |     child: Box<Wedding<'kiss> + 'SnowWhite>,
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     child: Box<dyn Wedding<'kiss> + 'SnowWhite>,
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: lifetime parameter instantiated with the lifetime 'SnowWhite as defined on the struct at 3:22
   --> $DIR/E0478.rs:3:22
diff --git a/src/test/ui/error-codes/E0719.rs b/src/test/ui/error-codes/E0719.rs
index 6b572f49cee..3311e190937 100644
--- a/src/test/ui/error-codes/E0719.rs
+++ b/src/test/ui/error-codes/E0719.rs
@@ -3,12 +3,12 @@ trait Foo: Iterator<Item = i32, Item = i32> {}
 
 type Unit = ();
 
-fn test() -> Box<Iterator<Item = (), Item = Unit>> {
+fn test() -> Box<dyn Iterator<Item = (), Item = Unit>> {
 //~^ ERROR is already specified
     Box::new(None.into_iter())
 }
 
 fn main() {
-    let _: &Iterator<Item = i32, Item = i32>;
+    let _: &dyn Iterator<Item = i32, Item = i32>;
     test();
 }
diff --git a/src/test/ui/error-codes/E0719.stderr b/src/test/ui/error-codes/E0719.stderr
index 5854cd7e143..c5b9a71c659 100644
--- a/src/test/ui/error-codes/E0719.stderr
+++ b/src/test/ui/error-codes/E0719.stderr
@@ -7,12 +7,12 @@ LL | trait Foo: Iterator<Item = i32, Item = i32> {}
    |                     `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
-  --> $DIR/E0719.rs:6:38
+  --> $DIR/E0719.rs:6:42
    |
-LL | fn test() -> Box<Iterator<Item = (), Item = Unit>> {
-   |                           ---------  ^^^^^^^^^^^ re-bound here
-   |                           |
-   |                           `Item` bound here first
+LL | fn test() -> Box<dyn Iterator<Item = (), Item = Unit>> {
+   |                               ---------  ^^^^^^^^^^^ re-bound here
+   |                               |
+   |                               `Item` bound here first
 
 error: aborting due to 2 previous errors