Move some tests to UI
This commit is contained in:
parent
db0be32fec
commit
3386757923
@ -20,10 +20,7 @@ const a: u8 = 2;
|
||||
|
||||
fn main() {
|
||||
let a = 4; //~ ERROR refutable pattern in local binding: `_` not covered
|
||||
//~^ NOTE pattern `_` not covered
|
||||
let c = 4; //~ ERROR refutable pattern in local binding: `_` not covered
|
||||
//~^ NOTE pattern `_` not covered
|
||||
let d = 4; //~ ERROR refutable pattern in local binding: `_` not covered
|
||||
//~^ NOTE pattern `_` not covered
|
||||
fn f() {} // Check that the `NOTE`s still work with an item here (c.f. issue #35115).
|
||||
}
|
20
src/test/ui/const-pattern-irrefutable.stderr
Normal file
20
src/test/ui/const-pattern-irrefutable.stderr
Normal file
@ -0,0 +1,20 @@
|
||||
error[E0005]: refutable pattern in local binding: `_` not covered
|
||||
--> $DIR/const-pattern-irrefutable.rs:22:9
|
||||
|
|
||||
22 | let a = 4; //~ ERROR refutable pattern in local binding: `_` not covered
|
||||
| ^ pattern `_` not covered
|
||||
|
||||
error[E0005]: refutable pattern in local binding: `_` not covered
|
||||
--> $DIR/const-pattern-irrefutable.rs:23:9
|
||||
|
|
||||
23 | let c = 4; //~ ERROR refutable pattern in local binding: `_` not covered
|
||||
| ^ pattern `_` not covered
|
||||
|
||||
error[E0005]: refutable pattern in local binding: `_` not covered
|
||||
--> $DIR/const-pattern-irrefutable.rs:24:9
|
||||
|
|
||||
24 | let d = 4; //~ ERROR refutable pattern in local binding: `_` not covered
|
||||
| ^ pattern `_` not covered
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
@ -8,11 +8,6 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use std::option::*;
|
||||
|
||||
fn main() {
|
||||
let None: isize = 42; //~ ERROR mismatched types
|
||||
log(debug, None);
|
||||
//~^ ERROR cannot find function `log` in this scope
|
||||
//~| ERROR cannot find value `debug` in this scope
|
||||
}
|
11
src/test/ui/resolve/name-clash-nullary.stderr
Normal file
11
src/test/ui/resolve/name-clash-nullary.stderr
Normal file
@ -0,0 +1,11 @@
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/name-clash-nullary.rs:12:7
|
||||
|
|
||||
12 | let None: isize = 42; //~ ERROR mismatched types
|
||||
| ^^^^ expected isize, found enum `std::option::Option`
|
||||
|
|
||||
= note: expected type `isize`
|
||||
found type `std::option::Option<_>`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
Loading…
x
Reference in New Issue
Block a user