Move some tests to UI

This commit is contained in:
Vadim Petrochenkov 2017-11-04 03:01:56 +03:00
parent db0be32fec
commit 3386757923
4 changed files with 31 additions and 8 deletions

View File

@ -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).
}

View 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

View File

@ -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
}

View 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