diff options
| author | bors <bors@rust-lang.org> | 2025-05-09 20:37:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-05-09 20:37:37 +0000 |
| commit | 17067e9ac6d7ecb70e50f92c1944e545188d2359 (patch) | |
| tree | 10cdfd82bfa6bb95d7e99b7ab53d8121fc7a8913 /src/tools/clippy/tests/ui/entry.fixed | |
| parent | af91af44eb85ceac634afa72cc73be4af358b350 (diff) | |
| parent | 908c30b3e1b758d46501de460163e9761c65534f (diff) | |
| download | rust-1.87.0.tar.gz rust-1.87.0.zip | |
Auto merge of #140859 - pietroalbini:pa-stable, r=pietroalbini 1.87.0
[stable] Prepare the 1.87.0 release Preparing the stable artifacts as described in the release process. This PR also includes the following last minute backports: * https://github.com/rust-lang/rust/pull/140810 * https://github.com/rust-lang/rust/pull/140601 * https://github.com/rust-lang/rust/pull/140684 r? `@ghost`
Diffstat (limited to 'src/tools/clippy/tests/ui/entry.fixed')
| -rw-r--r-- | src/tools/clippy/tests/ui/entry.fixed | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/entry.fixed b/src/tools/clippy/tests/ui/entry.fixed index 69452a8d9a6..f2df9f0204e 100644 --- a/src/tools/clippy/tests/ui/entry.fixed +++ b/src/tools/clippy/tests/ui/entry.fixed @@ -226,4 +226,26 @@ fn issue11976() { } } +mod issue14449 { + use std::collections::BTreeMap; + + pub struct Meow { + map: BTreeMap<String, String>, + } + + impl Meow { + fn pet(&self, _key: &str, _v: u32) -> u32 { + 42 + } + } + + pub fn f(meow: &Meow, x: String) { + if meow.map.contains_key(&x) { + let _ = meow.pet(&x, 1); + } else { + let _ = meow.pet(&x, 0); + } + } +} + fn main() {} |
