Skip to content

Commit

Permalink
Added test to make sure ignoring the error with a named wildcard valu…
Browse files Browse the repository at this point in the history
…e works
  • Loading branch information
Ricky authored and Ricky committed Dec 4, 2020
1 parent 4bc33d3 commit 5f821fb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/ui/map_err.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,9 @@ fn main() -> Result<(), Errors> {

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(())
}

0 comments on commit 5f821fb

Please sign in to comment.