diff options
Diffstat (limited to 'src/tools/clippy/tests/ui/entry.fixed')
| -rw-r--r-- | src/tools/clippy/tests/ui/entry.fixed | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/entry.fixed b/src/tools/clippy/tests/ui/entry.fixed index 71ec13f4610..abdfae2a3e1 100644 --- a/src/tools/clippy/tests/ui/entry.fixed +++ b/src/tools/clippy/tests/ui/entry.fixed @@ -176,4 +176,14 @@ pub fn issue_11935() { } } +fn issue12489(map: &mut HashMap<u64, u64>) -> Option<()> { + if let std::collections::hash_map::Entry::Vacant(e) = map.entry(1) { + let Some(1) = Some(2) else { + return None; + }; + e.insert(42); + } + Some(()) +} + fn main() {} |
