diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-10-21 00:02:06 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-10-21 14:06:28 +0300 |
| commit | 64c0efab85ba0fa131a33e4d5bd8189fa1159a75 (patch) | |
| tree | 35f74d2c9b22901092dbddabf5d0a345bbf0cc1a | |
| parent | 51f3b6241df34249c7a8100a5dde75e6ab95533d (diff) | |
| download | rust-64c0efab85ba0fa131a33e4d5bd8189fa1159a75.tar.gz rust-64c0efab85ba0fa131a33e4d5bd8189fa1159a75.zip | |
Make some ui/parser tests compile-pass
| -rw-r--r-- | src/test/ui/parser/bounds-obj-parens.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/parser/bounds-obj-parens.stderr | 8 | ||||
| -rw-r--r-- | src/test/ui/parser/impl-qpath.rs | 3 | ||||
| -rw-r--r-- | src/test/ui/parser/impl-qpath.stderr | 8 | ||||
| -rw-r--r-- | src/test/ui/parser/trailing-plus-in-bounds.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/parser/trailing-plus-in-bounds.stderr | 8 | ||||
| -rw-r--r-- | src/test/ui/parser/trait-object-trait-parens.rs | 3 | ||||
| -rw-r--r-- | src/test/ui/parser/trait-object-trait-parens.stderr | 8 | ||||
| -rw-r--r-- | src/test/ui/parser/trait-plusequal-splitting.rs | 9 | ||||
| -rw-r--r-- | src/test/ui/parser/trait-plusequal-splitting.stderr | 8 | ||||
| -rw-r--r-- | src/test/ui/parser/underscore-suffix-for-string.rs | 6 | ||||
| -rw-r--r-- | src/test/ui/parser/underscore-suffix-for-string.stderr | 10 |
12 files changed, 11 insertions, 68 deletions
diff --git a/src/test/ui/parser/bounds-obj-parens.rs b/src/test/ui/parser/bounds-obj-parens.rs index 9617df8fa21..7b47bbd951e 100644 --- a/src/test/ui/parser/bounds-obj-parens.rs +++ b/src/test/ui/parser/bounds-obj-parens.rs @@ -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 index 67dcbc45419..00000000000 --- a/src/test/ui/parser/bounds-obj-parens.stderr +++ /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 - diff --git a/src/test/ui/parser/impl-qpath.rs b/src/test/ui/parser/impl-qpath.rs index 48dd888b2e5..5dced73c90d 100644 --- a/src/test/ui/parser/impl-qpath.rs +++ b/src/test/ui/parser/impl-qpath.rs @@ -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 index 38a28f9001d..00000000000 --- a/src/test/ui/parser/impl-qpath.stderr +++ /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 - diff --git a/src/test/ui/parser/trailing-plus-in-bounds.rs b/src/test/ui/parser/trailing-plus-in-bounds.rs index 72cae6abc2d..b0dda815f83 100644 --- a/src/test/ui/parser/trailing-plus-in-bounds.rs +++ b/src/test/ui/parser/trailing-plus-in-bounds.rs @@ -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 @@ use std::fmt::Debug; 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 index 1719b1d5e08..00000000000 --- a/src/test/ui/parser/trailing-plus-in-bounds.stderr +++ /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 - diff --git a/src/test/ui/parser/trait-object-trait-parens.rs b/src/test/ui/parser/trait-object-trait-parens.rs index dc44f4f3fb1..1feb0c84532 100644 --- a/src/test/ui/parser/trait-object-trait-parens.rs +++ b/src/test/ui/parser/trait-object-trait-parens.rs @@ -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 index 27f13d77876..00000000000 --- a/src/test/ui/parser/trait-object-trait-parens.stderr +++ /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 - diff --git a/src/test/ui/parser/trait-plusequal-splitting.rs b/src/test/ui/parser/trait-plusequal-splitting.rs index cbb955fe61d..32174d6254a 100644 --- a/src/test/ui/parser/trait-plusequal-splitting.rs +++ b/src/test/ui/parser/trait-plusequal-splitting.rs @@ -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 index 266473ed222..00000000000 --- a/src/test/ui/parser/trait-plusequal-splitting.stderr +++ /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 - diff --git a/src/test/ui/parser/underscore-suffix-for-string.rs b/src/test/ui/parser/underscore-suffix-for-string.rs index 05de5f8e194..6917134c5f7 100644 --- a/src/test/ui/parser/underscore-suffix-for-string.rs +++ b/src/test/ui/parser/underscore-suffix-for-string.rs @@ -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 diff --git a/src/test/ui/parser/underscore-suffix-for-string.stderr b/src/test/ui/parser/underscore-suffix-for-string.stderr index b20fd299021..5455588cf17 100644 --- a/src/test/ui/parser/underscore-suffix-for-string.stderr +++ b/src/test/ui/parser/underscore-suffix-for-string.stderr @@ -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 - |
