]> git.lizzy.rs Git - rust.git/commitdiff
Make some ui/parser tests compile-pass
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>
Sat, 20 Oct 2018 21:02:06 +0000 (00:02 +0300)
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>
Sun, 21 Oct 2018 11:06:28 +0000 (14:06 +0300)
12 files changed:
src/test/ui/parser/bounds-obj-parens.rs
src/test/ui/parser/bounds-obj-parens.stderr [deleted file]
src/test/ui/parser/impl-qpath.rs
src/test/ui/parser/impl-qpath.stderr [deleted file]
src/test/ui/parser/trailing-plus-in-bounds.rs
src/test/ui/parser/trailing-plus-in-bounds.stderr [deleted file]
src/test/ui/parser/trait-object-trait-parens.rs
src/test/ui/parser/trait-object-trait-parens.stderr [deleted file]
src/test/ui/parser/trait-plusequal-splitting.rs
src/test/ui/parser/trait-plusequal-splitting.stderr [deleted file]
src/test/ui/parser/underscore-suffix-for-string.rs
src/test/ui/parser/underscore-suffix-for-string.stderr

index 9617df8fa21a9c1a3d1a9c5556d771d341baddda..7b47bbd951edee86b0393fff2dae9c861b6acd20 100644 (file)
@@ -8,9 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// compile-pass
 // compile-flags: -Z parse-only
 
 type A = Box<(Fn(D::Error) -> E) + 'static + Send + Sync>; // OK (but see #39318)
-
-FAIL
-//~^ ERROR
diff --git a/src/test/ui/parser/bounds-obj-parens.stderr b/src/test/ui/parser/bounds-obj-parens.stderr
deleted file mode 100644 (file)
index 67dcbc4..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-error: expected one of `!` or `::`, found `<eof>`
-  --> $DIR/bounds-obj-parens.rs:15:1
-   |
-LL | FAIL
-   | ^^^^ expected one of `!` or `::` here
-
-error: aborting due to previous error
-
index 48dd888b2e530d92b93c8716e72b963005724e14..5dced73c90d4b8bb64e92f81c0f4c6de5b07eee2 100644 (file)
@@ -8,11 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// compile-pass
 // compile-flags: -Z parse-only
 
 impl <*const u8>::AssocTy {} // OK
 impl <Type as Trait>::AssocTy {} // OK
 impl <'a + Trait>::AssocTy {} // OK
 impl <<Type>::AssocTy>::AssocTy {} // OK
-
-FAIL //~ ERROR
diff --git a/src/test/ui/parser/impl-qpath.stderr b/src/test/ui/parser/impl-qpath.stderr
deleted file mode 100644 (file)
index 38a28f9..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-error: expected one of `!` or `::`, found `<eof>`
-  --> $DIR/impl-qpath.rs:18:1
-   |
-LL | FAIL //~ ERROR
-   | ^^^^ expected one of `!` or `::` here
-
-error: aborting due to previous error
-
index 72cae6abc2dbeb929ead5bac346d78df3a83b5d9..b0dda815f83036e5f867292343cdb6b429c8c9de 100644 (file)
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// compile-pass
 // compile-flags: -Z parse-only -Z continue-parse-after-error
 
 use std::fmt::Debug;
@@ -15,6 +16,3 @@
 fn main() {
     let x: Box<Debug+> = box 3 as Box<Debug+>; // Trailing `+` is OK
 }
-
-FAIL
-//~^ ERROR
diff --git a/src/test/ui/parser/trailing-plus-in-bounds.stderr b/src/test/ui/parser/trailing-plus-in-bounds.stderr
deleted file mode 100644 (file)
index 1719b1d..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-error: expected one of `!` or `::`, found `<eof>`
-  --> $DIR/trailing-plus-in-bounds.rs:19:1
-   |
-LL | FAIL
-   | ^^^^ expected one of `!` or `::` here
-
-error: aborting due to previous error
-
index dc44f4f3fb1353db6bd3acad024a71655ffc528c..1feb0c84532a87a1d65fa985f305043e99beac63 100644 (file)
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// compile-pass
 // compile-flags: -Z parse-only
 
 fn f<T: (Copy) + (?Sized) + (for<'a> Trait<'a>)>() {}
@@ -17,5 +18,3 @@ fn main() {
     let _: Box<(?Sized) + (for<'a> Trait<'a>) + (Copy)>;
     let _: Box<(for<'a> Trait<'a>) + (Copy) + (?Sized)>;
 }
-
-FAIL //~ ERROR
diff --git a/src/test/ui/parser/trait-object-trait-parens.stderr b/src/test/ui/parser/trait-object-trait-parens.stderr
deleted file mode 100644 (file)
index 27f13d7..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-error: expected one of `!` or `::`, found `<eof>`
-  --> $DIR/trait-object-trait-parens.rs:21:1
-   |
-LL | FAIL //~ ERROR
-   | ^^^^ expected one of `!` or `::` here
-
-error: aborting due to previous error
-
index cbb955fe61d03836b3fd0b1c5a6668a879154182..32174d6254a96aa4a2b7b1cb0c7f69675df6aee0 100644 (file)
@@ -8,13 +8,12 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// compile-flags: -Z parse-only
 // Fixes issue where `+` in generics weren't parsed if they were part of a `+=`.
 
+// compile-pass
+// compile-flags: -Z parse-only
+
 struct Whitespace<T: Clone + = ()> { t: T }
 struct TokenSplit<T: Clone +=  ()> { t: T }
 
-fn main() {
-}
-
-FAIL //~ ERROR
+fn main() {}
diff --git a/src/test/ui/parser/trait-plusequal-splitting.stderr b/src/test/ui/parser/trait-plusequal-splitting.stderr
deleted file mode 100644 (file)
index 266473e..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-error: expected one of `!` or `::`, found `<eof>`
-  --> $DIR/trait-plusequal-splitting.rs:20:1
-   |
-LL | FAIL //~ ERROR
-   | ^^^^ expected one of `!` or `::` here
-
-error: aborting due to previous error
-
index 05de5f8e1941b7dc7ce80d4ab6f0b7b68c4f3266..6917134c5f7e41668aa8ab9b6250d1f0fc553ddf 100644 (file)
@@ -8,13 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// compile-pass
+
 fn main() {
     let _ = "Foo"_;
     //~^ WARNING underscore literal suffix is not allowed
     //~| WARNING this was previously accepted
     //~| NOTE issue #42326
 }
-
-FAIL
-//~^ ERROR
-//~| NOTE
index b20fd29902175b2536ace7926b71ec91dcbb217a..5455588cf17a4b165258f3fc9ab68d1ab9ec20cf 100644 (file)
@@ -1,5 +1,5 @@
 warning: underscore literal suffix is not allowed
-  --> $DIR/underscore-suffix-for-string.rs:12:18
+  --> $DIR/underscore-suffix-for-string.rs:14:18
    |
 LL |     let _ = "Foo"_;
    |                  ^
@@ -7,11 +7,3 @@ LL |     let _ = "Foo"_;
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #42326 <https://github.com/rust-lang/rust/issues/42326>
 
-error: expected one of `!` or `::`, found `<eof>`
-  --> $DIR/underscore-suffix-for-string.rs:18:1
-   |
-LL | FAIL
-   | ^^^^ expected one of `!` or `::` here
-
-error: aborting due to previous error
-