Skip to content

Commit 5fcfa08

Browse files
committedJun 12, 2017
Fix affected tests
1 parent 3a7dbf4 commit 5fcfa08

10 files changed

+14
-13
lines changed
 

‎src/libsyntax/parse/parser.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2851,7 +2851,8 @@ impl<'a> Parser<'a> {
28512851
_ => "a type".to_string(),
28522852
};
28532853
err.span_suggestion(suggestion_span,
2854-
"if you want to compare the casted value then write",
2854+
"if you want to compare the casted value \
2855+
then write:",
28552856
suggestion);
28562857
err.level = Level::Warning;
28572858
err.set_message(&format!("`<` is interpreted as a start of generic \

‎src/test/parse-fail/better-expected.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
// compile-flags: -Z parse-only
1212

1313
fn main() {
14-
let x: [isize 3]; //~ ERROR expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `3`
14+
let x: [isize 3]; //~ ERROR expected one of `!`, `(`, `+`, `::`, `;`, or `]`, found `3`
1515
}

‎src/test/parse-fail/bounds-type-where.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ type A where T: Trait + Trait = u8; // OK
1818
type A where = u8; // OK
1919
type A where T: Trait + = u8; // OK
2020
type A where T, = u8;
21-
//~^ ERROR expected one of `!`, `(`, `+`, `::`, `:`, `<`, `==`, or `=`, found `,`
21+
//~^ ERROR expected one of `!`, `(`, `+`, `::`, `:`, `==`, or `=`, found `,`
2222

2323
fn main() {}

‎src/test/parse-fail/closure-return-syntax.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313

1414
fn main() {
1515
let x = || -> i32 22;
16-
//~^ ERROR expected one of `!`, `(`, `::`, `<`, or `{`, found `22`
16+
//~^ ERROR expected one of `!`, `(`, `::`, or `{`, found `22`
1717
}

‎src/test/parse-fail/empty-impl-semicolon.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010

1111
// compile-flags: -Z parse-only
1212

13-
impl Foo; //~ ERROR expected one of `!`, `(`, `+`, `::`, `<`, `for`, `where`, or `{`, found `;`
13+
impl Foo; //~ ERROR expected one of `!`, `(`, `+`, `::`, `for`, `where`, or `{`, found `;`

‎src/test/parse-fail/multitrait.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ struct S {
1515
}
1616

1717
impl Cmp, ToString for S {
18-
//~^ ERROR: expected one of `!`, `(`, `+`, `::`, `<`, `for`, `where`, or `{`, found `,`
18+
//~^ ERROR: expected one of `!`, `(`, `+`, `::`, `for`, `where`, or `{`, found `,`
1919
fn eq(&&other: S) { false }
2020
fn to_string(&self) -> String { "hi".to_string() }
2121
}

‎src/test/parse-fail/removed-syntax-closure-lifetime.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
// compile-flags: -Z parse-only
1212

1313
type closure = Box<lt/fn()>;
14-
//~^ ERROR expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `/`
14+
//~^ ERROR expected one of `!`, `(`, `+`, `,`, `::`, or `>`, found `/`

‎src/test/parse-fail/removed-syntax-fixed-vec.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010

1111
// compile-flags: -Z parse-only
1212

13-
type v = [isize * 3]; //~ ERROR expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `*`
13+
type v = [isize * 3]; //~ ERROR expected one of `!`, `(`, `+`, `::`, `;`, or `]`, found `*`

‎src/test/parse-fail/removed-syntax-ptr-lifetime.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010

1111
// compile-flags: -Z parse-only
1212

13-
type bptr = &lifetime/isize; //~ ERROR expected one of `!`, `(`, `::`, `;`, or `<`, found `/`
13+
type bptr = &lifetime/isize; //~ ERROR expected one of `!`, `(`, `::`, or `;`, found `/`

‎src/test/ui/issue-22644.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
warning: `<` is interpreted as a start of generic arguments for `usize`, not comparison
1+
warning: `<` is interpreted as a start of generic arguments for `usize`, not a comparison
22
--> $DIR/issue-22644.rs:16:33
33
|
44
16 | println!("{}", a as usize < b);
55
| ^ expected one of `!`, `(`, `+`, `,`, `::`, or `>` here
66
|
7-
help: if you want to compare the casted value then write
7+
help: if you want to compare the casted value then write:
88
| println!("{}", (a as usize) < b);
99

10-
warning: `<` is interpreted as a start of generic arguments for `usize`, not comparison
10+
warning: `<` is interpreted as a start of generic arguments for `usize`, not a comparison
1111
--> $DIR/issue-22644.rs:17:33
1212
|
1313
17 | println!("{}", a as usize < 4);
1414
| -^ unexpected token
1515
| |
1616
| expected one of `>`, identifier, lifetime, or type here
1717
|
18-
help: if you want to compare the casted value then write
18+
help: if you want to compare the casted value then write:
1919
| println!("{}", (a as usize) < 4);
2020

0 commit comments

Comments
 (0)
Please sign in to comment.