// 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
+++ /dev/null
-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
-
// 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
+++ /dev/null
-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
-
// 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;
fn main() {
let x: Box<Debug+> = box 3 as Box<Debug+>; // Trailing `+` is OK
}
-
-FAIL
-//~^ ERROR
+++ /dev/null
-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
-
// 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>)>() {}
let _: Box<(?Sized) + (for<'a> Trait<'a>) + (Copy)>;
let _: Box<(for<'a> Trait<'a>) + (Copy) + (?Sized)>;
}
-
-FAIL //~ ERROR
+++ /dev/null
-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
-
// 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() {}
+++ /dev/null
-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
-
// 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
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"_;
| ^
= 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
-