]> git.lizzy.rs Git - rust.git/commitdiff
Update ui tests
authorOliver Scherer <github35764891676564198441@oli-obk.de>
Fri, 30 Nov 2018 08:41:26 +0000 (09:41 +0100)
committerOliver Scherer <github35764891676564198441@oli-obk.de>
Tue, 4 Dec 2018 09:06:05 +0000 (10:06 +0100)
src/test/ui/macros/macro-in-expression-context-2.rs
src/test/ui/proc-macro/span-preservation.rs
src/test/ui/proc-macro/span-preservation.stderr
src/test/ui/suggestions/suggest-move-lifetimes.rs
src/test/ui/suggestions/suggest-move-lifetimes.stderr

index 766f313586376ba7ead3ba50dc60200a92f57840..9423f0a359c69bdf04de02bccd2b926cde56afcb 100644 (file)
@@ -3,6 +3,6 @@ macro_rules! empty { () => () }
 fn main() {
     match 42 {
         _ => { empty!() }
-//~^ ERROR expected expression, found `<eof>`
+//~^ ERROR macro expansion ends with an incomplete expression
     };
 }
index adcb42ab2d1ccc4e3431aefc4b794b0e2e45bf09..64f675ecc1c4d1f3579e1eaff60cdc52ab3341cc 100644 (file)
@@ -1,3 +1,4 @@
+//~ ERROR mismatched types
 // aux-build:span-preservation.rs
 
 // For each of these, we should get the appropriate type mismatch error message,
 
 #[foo]
 fn a() {
-    let x: usize = "hello";;;;;
+    let x: usize = "hello";;;;; //~ ERROR mismatched types
 }
 
 #[foo]
 fn b(x: Option<isize>) -> usize {
     match x {
-        Some(x) => { return x },
+        Some(x) => { return x }, //~ ERROR mismatched types
         None => 10
     }
 }
@@ -31,8 +32,8 @@ struct Bar {
         b: usize
     }
 
-    let x = Foo { a: 10isize };
-    let y = Foo { a: 10, b: 10isize };
+    let x = Foo { a: 10isize }; //~ ERROR mismatched types
+    let y = Foo { a: 10, b: 10isize }; //~ ERROR has no field named `b`
 }
 
 // FIXME: This doesn't work at the moment. See the one below. The pretty-printer
@@ -45,7 +46,7 @@ struct Bar {
 
 #[foo]
 extern "C" fn baz() {
-    0
+    0 //~ ERROR mismatched types
 }
 
 fn main() {}
index f33245aec37201e031ddf1f5a4e0ac225822d219..64d0173cb9c224355ed3ff7461b8b2757ec09ab5 100644 (file)
@@ -4,40 +4,40 @@ error[E0308]: mismatched types
               found type `{integer}`
 
 error[E0308]: mismatched types
-  --> $DIR/span-preservation.rs:12:20
+  --> $DIR/span-preservation.rs:13:20
    |
-LL |     let x: usize = "hello";;;;;
+LL |     let x: usize = "hello";;;;; //~ ERROR mismatched types
    |                    ^^^^^^^ expected usize, found reference
    |
    = note: expected type `usize`
               found type `&'static str`
 
 error[E0308]: mismatched types
-  --> $DIR/span-preservation.rs:18:29
+  --> $DIR/span-preservation.rs:19:29
    |
-LL |         Some(x) => { return x },
+LL |         Some(x) => { return x }, //~ ERROR mismatched types
    |                             ^ expected usize, found isize
 
 error[E0308]: mismatched types
-  --> $DIR/span-preservation.rs:34:22
+  --> $DIR/span-preservation.rs:35:22
    |
-LL |     let x = Foo { a: 10isize };
+LL |     let x = Foo { a: 10isize }; //~ ERROR mismatched types
    |                      ^^^^^^^ expected usize, found isize
 
 error[E0560]: struct `c::Foo` has no field named `b`
-  --> $DIR/span-preservation.rs:35:26
+  --> $DIR/span-preservation.rs:36:26
    |
-LL |     let y = Foo { a: 10, b: 10isize };
+LL |     let y = Foo { a: 10, b: 10isize }; //~ ERROR has no field named `b`
    |                          ^ `c::Foo` does not have this field
    |
    = note: available fields are: `a`
 
 error[E0308]: mismatched types
-  --> $DIR/span-preservation.rs:48:5
+  --> $DIR/span-preservation.rs:49:5
    |
 LL | extern "C" fn baz() {
    |                     - possibly return type missing here?
-LL |     0
+LL |     0 //~ ERROR mismatched types
    |     ^ expected (), found integral variable
    |
    = note: expected type `()`
index 5051a406078aa74eb6961d01e65e84147674cacb..6b26f1214368ca8f104ed7e2db9dbbaa965fcc7d 100644 (file)
@@ -1,18 +1,18 @@
-struct A<T, 'a> {
+struct A<T, 'a> { //~ ERROR lifetime parameters must be declared
     t: &'a T,
 }
 
-struct B<T, 'a, U> {
+struct B<T, 'a, U> { //~ ERROR lifetime parameters must be declared
     t: &'a T,
     u: U,
 }
 
-struct C<T, U, 'a> {
+struct C<T, U, 'a> { //~ ERROR lifetime parameters must be declared
     t: &'a T,
     u: U,
 }
 
-struct D<T, U, 'a, 'b, V, 'c> {
+struct D<T, U, 'a, 'b, V, 'c> { //~ ERROR lifetime parameters must be declared
     t: &'a T,
     u: &'b U,
     v: &'c V,
index f3d6469b5125501752128afcd05a02aed2f3c7d7..72a2cbe6bf6de07798cdacc79e6b48c3f4907ca5 100644 (file)
@@ -1,41 +1,41 @@
 error: lifetime parameters must be declared prior to type parameters
   --> $DIR/suggest-move-lifetimes.rs:1:13
    |
-LL | struct A<T, 'a> {
+LL | struct A<T, 'a> { //~ ERROR lifetime parameters must be declared
    |             ^^
 help: move the lifetime parameter prior to the first type parameter
    |
-LL | struct A<'a, T> {
+LL | struct A<'a, T> { //~ ERROR lifetime parameters must be declared
    |          ^^^ --
 
 error: lifetime parameters must be declared prior to type parameters
   --> $DIR/suggest-move-lifetimes.rs:5:13
    |
-LL | struct B<T, 'a, U> {
+LL | struct B<T, 'a, U> { //~ ERROR lifetime parameters must be declared
    |             ^^
 help: move the lifetime parameter prior to the first type parameter
    |
-LL | struct B<'a, T, U> {
+LL | struct B<'a, T, U> { //~ ERROR lifetime parameters must be declared
    |          ^^^   --
 
 error: lifetime parameters must be declared prior to type parameters
   --> $DIR/suggest-move-lifetimes.rs:10:16
    |
-LL | struct C<T, U, 'a> {
+LL | struct C<T, U, 'a> { //~ ERROR lifetime parameters must be declared
    |                ^^
 help: move the lifetime parameter prior to the first type parameter
    |
-LL | struct C<'a, T, U> {
+LL | struct C<'a, T, U> { //~ ERROR lifetime parameters must be declared
    |          ^^^    --
 
 error: lifetime parameters must be declared prior to type parameters
   --> $DIR/suggest-move-lifetimes.rs:15:16
    |
-LL | struct D<T, U, 'a, 'b, V, 'c> {
+LL | struct D<T, U, 'a, 'b, V, 'c> { //~ ERROR lifetime parameters must be declared
    |                ^^  ^^     ^^
 help: move the lifetime parameter prior to the first type parameter
    |
-LL | struct D<'a, 'b, 'c, T, U, V> {
+LL | struct D<'a, 'b, 'c, T, U, V> { //~ ERROR lifetime parameters must be declared
    |          ^^^ ^^^ ^^^      ---
 
 error: aborting due to 4 previous errors