Add ui_test error annotations in existing tests
This commit is contained in:
parent
b9906aca5a
commit
822c7df545
@ -7,9 +7,11 @@ fn foo() -> Result<(), ()> {
|
||||
|
||||
fn main() {
|
||||
match foo() {
|
||||
Ok(()) => {},
|
||||
Err(()) => {},
|
||||
Ok(()) => {}, //~ ERROR: matching over `()` is more explicit
|
||||
Err(()) => {}, //~ ERROR: matching over `()` is more explicit
|
||||
}
|
||||
if let Ok(()) = foo() {}
|
||||
//~^ ERROR: matching over `()` is more explicit
|
||||
let _ = foo().map_err(|()| todo!());
|
||||
//~^ ERROR: matching over `()` is more explicit
|
||||
}
|
||||
|
@ -7,9 +7,11 @@ fn foo() -> Result<(), ()> {
|
||||
|
||||
fn main() {
|
||||
match foo() {
|
||||
Ok(_) => {},
|
||||
Err(_) => {},
|
||||
Ok(_) => {}, //~ ERROR: matching over `()` is more explicit
|
||||
Err(_) => {}, //~ ERROR: matching over `()` is more explicit
|
||||
}
|
||||
if let Ok(_) = foo() {}
|
||||
//~^ ERROR: matching over `()` is more explicit
|
||||
let _ = foo().map_err(|_| todo!());
|
||||
//~^ ERROR: matching over `()` is more explicit
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ LL | if let Ok(_) = foo() {}
|
||||
| ^ help: use `()` instead of `_`: `()`
|
||||
|
||||
error: matching over `()` is more explicit
|
||||
--> $DIR/ignored_unit_patterns.rs:14:28
|
||||
--> $DIR/ignored_unit_patterns.rs:15:28
|
||||
|
|
||||
LL | let _ = foo().map_err(|_| todo!());
|
||||
| ^ help: use `()` instead of `_`: `()`
|
||||
|
Loading…
x
Reference in New Issue
Block a user