mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-06 04:08:40 +00:00
Added test to make sure ignoring the error with a named wildcard value works
This commit is contained in:
parent
4bc33d3722
commit
5f821fbcf1
@ -22,5 +22,9 @@ fn main() -> Result<(), Errors> {
|
|||||||
|
|
||||||
println!("{:?}", x.map_err(|_| Errors::Ignored));
|
println!("{:?}", x.map_err(|_| Errors::Ignored));
|
||||||
|
|
||||||
|
// Should not warn you because you explicitly ignore the parameter
|
||||||
|
// using a named wildcard value
|
||||||
|
println!("{:?}", x.map_err(|_foo| Errors::Ignored));
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user