Skip to content

Commit 5f821fb

Browse files
RickyRicky
Ricky
authored and
Ricky
committed
Added test to make sure ignoring the error with a named wildcard value works
1 parent 4bc33d3 commit 5f821fb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/ui/map_err.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,9 @@ fn main() -> Result<(), Errors> {
2222

2323
println!("{:?}", x.map_err(|_| Errors::Ignored));
2424

25+
// Should not warn you because you explicitly ignore the parameter
26+
// using a named wildcard value
27+
println!("{:?}", x.map_err(|_foo| Errors::Ignored));
28+
2529
Ok(())
2630
}

0 commit comments

Comments
 (0)