Skip to content

Commit 3386757

Browse files
committed
Move some tests to UI
1 parent db0be32 commit 3386757

File tree

4 files changed

+31
-8
lines changed

4 files changed

+31
-8
lines changed

src/test/compile-fail/const-pattern-irrefutable.rs renamed to src/test/ui/const-pattern-irrefutable.rs

-3
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ const a: u8 = 2;
2020

2121
fn main() {
2222
let a = 4; //~ ERROR refutable pattern in local binding: `_` not covered
23-
//~^ NOTE pattern `_` not covered
2423
let c = 4; //~ ERROR refutable pattern in local binding: `_` not covered
25-
//~^ NOTE pattern `_` not covered
2624
let d = 4; //~ ERROR refutable pattern in local binding: `_` not covered
27-
//~^ NOTE pattern `_` not covered
2825
fn f() {} // Check that the `NOTE`s still work with an item here (c.f. issue #35115).
2926
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
error[E0005]: refutable pattern in local binding: `_` not covered
2+
--> $DIR/const-pattern-irrefutable.rs:22:9
3+
|
4+
22 | let a = 4; //~ ERROR refutable pattern in local binding: `_` not covered
5+
| ^ pattern `_` not covered
6+
7+
error[E0005]: refutable pattern in local binding: `_` not covered
8+
--> $DIR/const-pattern-irrefutable.rs:23:9
9+
|
10+
23 | let c = 4; //~ ERROR refutable pattern in local binding: `_` not covered
11+
| ^ pattern `_` not covered
12+
13+
error[E0005]: refutable pattern in local binding: `_` not covered
14+
--> $DIR/const-pattern-irrefutable.rs:24:9
15+
|
16+
24 | let d = 4; //~ ERROR refutable pattern in local binding: `_` not covered
17+
| ^ pattern `_` not covered
18+
19+
error: aborting due to 3 previous errors
20+

src/test/compile-fail/name-clash-nullary.rs renamed to src/test/ui/resolve/name-clash-nullary.rs

-5
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use std::option::*;
12-
1311
fn main() {
1412
let None: isize = 42; //~ ERROR mismatched types
15-
log(debug, None);
16-
//~^ ERROR cannot find function `log` in this scope
17-
//~| ERROR cannot find value `debug` in this scope
1813
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
error[E0308]: mismatched types
2+
--> $DIR/name-clash-nullary.rs:12:7
3+
|
4+
12 | let None: isize = 42; //~ ERROR mismatched types
5+
| ^^^^ expected isize, found enum `std::option::Option`
6+
|
7+
= note: expected type `isize`
8+
found type `std::option::Option<_>`
9+
10+
error: aborting due to previous error
11+

0 commit comments

Comments
 (0)