Fix affected tests
This commit is contained in:
parent
3a7dbf48fe
commit
5fcfa08e98
@ -2851,7 +2851,8 @@ impl<'a> Parser<'a> {
|
||||
_ => "a type".to_string(),
|
||||
};
|
||||
err.span_suggestion(suggestion_span,
|
||||
"if you want to compare the casted value then write",
|
||||
"if you want to compare the casted value \
|
||||
then write:",
|
||||
suggestion);
|
||||
err.level = Level::Warning;
|
||||
err.set_message(&format!("`<` is interpreted as a start of generic \
|
||||
|
@ -11,5 +11,5 @@
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
fn main() {
|
||||
let x: [isize 3]; //~ ERROR expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `3`
|
||||
let x: [isize 3]; //~ ERROR expected one of `!`, `(`, `+`, `::`, `;`, or `]`, found `3`
|
||||
}
|
||||
|
@ -18,6 +18,6 @@ type A where T: Trait + Trait = u8; // OK
|
||||
type A where = u8; // OK
|
||||
type A where T: Trait + = u8; // OK
|
||||
type A where T, = u8;
|
||||
//~^ ERROR expected one of `!`, `(`, `+`, `::`, `:`, `<`, `==`, or `=`, found `,`
|
||||
//~^ ERROR expected one of `!`, `(`, `+`, `::`, `:`, `==`, or `=`, found `,`
|
||||
|
||||
fn main() {}
|
||||
|
@ -13,5 +13,5 @@
|
||||
|
||||
fn main() {
|
||||
let x = || -> i32 22;
|
||||
//~^ ERROR expected one of `!`, `(`, `::`, `<`, or `{`, found `22`
|
||||
//~^ ERROR expected one of `!`, `(`, `::`, or `{`, found `22`
|
||||
}
|
||||
|
@ -10,4 +10,4 @@
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
impl Foo; //~ ERROR expected one of `!`, `(`, `+`, `::`, `<`, `for`, `where`, or `{`, found `;`
|
||||
impl Foo; //~ ERROR expected one of `!`, `(`, `+`, `::`, `for`, `where`, or `{`, found `;`
|
||||
|
@ -15,7 +15,7 @@ struct S {
|
||||
}
|
||||
|
||||
impl Cmp, ToString for S {
|
||||
//~^ ERROR: expected one of `!`, `(`, `+`, `::`, `<`, `for`, `where`, or `{`, found `,`
|
||||
//~^ ERROR: expected one of `!`, `(`, `+`, `::`, `for`, `where`, or `{`, found `,`
|
||||
fn eq(&&other: S) { false }
|
||||
fn to_string(&self) -> String { "hi".to_string() }
|
||||
}
|
||||
|
@ -11,4 +11,4 @@
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
type closure = Box<lt/fn()>;
|
||||
//~^ ERROR expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `/`
|
||||
//~^ ERROR expected one of `!`, `(`, `+`, `,`, `::`, or `>`, found `/`
|
||||
|
@ -10,4 +10,4 @@
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
type v = [isize * 3]; //~ ERROR expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `*`
|
||||
type v = [isize * 3]; //~ ERROR expected one of `!`, `(`, `+`, `::`, `;`, or `]`, found `*`
|
||||
|
@ -10,4 +10,4 @@
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
type bptr = &lifetime/isize; //~ ERROR expected one of `!`, `(`, `::`, `;`, or `<`, found `/`
|
||||
type bptr = &lifetime/isize; //~ ERROR expected one of `!`, `(`, `::`, or `;`, found `/`
|
||||
|
@ -1,13 +1,13 @@
|
||||
warning: `<` is interpreted as a start of generic arguments for `usize`, not comparison
|
||||
warning: `<` is interpreted as a start of generic arguments for `usize`, not a comparison
|
||||
--> $DIR/issue-22644.rs:16:33
|
||||
|
|
||||
16 | println!("{}", a as usize < b);
|
||||
| ^ expected one of `!`, `(`, `+`, `,`, `::`, or `>` here
|
||||
|
|
||||
help: if you want to compare the casted value then write
|
||||
help: if you want to compare the casted value then write:
|
||||
| println!("{}", (a as usize) < b);
|
||||
|
||||
warning: `<` is interpreted as a start of generic arguments for `usize`, not comparison
|
||||
warning: `<` is interpreted as a start of generic arguments for `usize`, not a comparison
|
||||
--> $DIR/issue-22644.rs:17:33
|
||||
|
|
||||
17 | println!("{}", a as usize < 4);
|
||||
@ -15,6 +15,6 @@ warning: `<` is interpreted as a start of generic arguments for `usize`, not com
|
||||
| |
|
||||
| expected one of `>`, identifier, lifetime, or type here
|
||||
|
|
||||
help: if you want to compare the casted value then write
|
||||
help: if you want to compare the casted value then write:
|
||||
| println!("{}", (a as usize) < 4);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user