Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 5f821fb

Browse files
RickyRicky
authored andcommitted
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)