Skip to content

Commit 09fbf38

Browse files
committed
Update tests
1 parent b842b34 commit 09fbf38

File tree

6 files changed

+26
-41
lines changed

6 files changed

+26
-41
lines changed
+12-11
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
error: emplacement syntax is obsolete (for now, anyway)
2-
--> $DIR/bad.rs:9:5
3-
|
4-
LL | x <- y;
5-
| ^^^^^^
6-
|
7-
= note: for more information, see <https://github.com/rust-lang/rust/issues/27779#issuecomment-378416911>
8-
9-
error: emplacement syntax is obsolete (for now, anyway)
1+
error: expected expression, found keyword `in`
102
--> $DIR/bad.rs:10:5
113
|
124
LL | in(foo) { bar };
13-
| ^^^^^^^^^^^^^^^
5+
| ^^ expected expression
6+
7+
error[E0282]: type annotations needed
8+
--> $DIR/bad.rs:9:8
9+
|
10+
LL | let (x, y, foo, bar);
11+
| ---------------- consider giving the pattern a type
12+
LL | x <- y;
13+
| ^^^ cannot infer type
1414
|
15-
= note: for more information, see <https://github.com/rust-lang/rust/issues/27779#issuecomment-378416911>
15+
= note: type must be known at this point
1616

1717
error: aborting due to 2 previous errors
1818

19+
For more information about this error, try `rustc --explain E0282`.

src/test/ui/obsolete-in-place/bad.rs

+3-11
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
// Check that `<-` and `in` syntax gets a hard error.
22

3-
// revisions: good bad
4-
//[good] run-pass
5-
6-
#[cfg(bad)]
7-
fn main() {
8-
let (x, y, foo, bar);
9-
x <- y; //[bad]~ ERROR emplacement syntax is obsolete
10-
in(foo) { bar }; //[bad]~ ERROR emplacement syntax is obsolete
11-
}
12-
13-
#[cfg(good)]
143
fn main() {
4+
let (x, y, foo, bar) = (0, 0, 0, 0);
5+
x <- y; // ok: parses as a comparison
6+
in(foo) { bar }; //~ERROR expected expression, found keyword `in`
157
}
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
error: expected expression, found keyword `in`
2+
--> $DIR/bad.rs:6:5
3+
|
4+
LL | in(foo) { bar };
5+
| ^^ expected expression
6+
7+
error: aborting due to previous error
8+

src/test/ui/parser/if-in-in.stderr

-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ LL | for i in in 1..2 {
55
| ---^^
66
| |
77
| help: remove the duplicated `in`
8-
|
9-
= note: if you meant to use emplacement syntax, it is obsolete (for now, anyway)
10-
= note: for more information on the status of emplacement syntax, see <https://github.com/rust-lang/rust/issues/27779#issuecomment-378416911>
118

129
error: aborting due to previous error
1310

src/test/ui/placement-syntax.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
// run-pass
2+
13
fn main() {
24
let x = -5;
3-
if x<-1 {
4-
//~^ ERROR emplacement syntax is obsolete
5+
if x<-1 { // ok: parses as a comparison
56
println!("ok");
67
}
78
}

src/test/ui/placement-syntax.stderr

-14
This file was deleted.

0 commit comments

Comments
 (0)