From c23a457e72abe608715ac76f076f47dc42af07a5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 20:31:44 +0200 Subject: Merging upstream version 1.74.1+dfsg1. Signed-off-by: Daniel Baumann --- src/tools/clippy/tests/ui/crashes/ice-7169.fixed | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/tools/clippy/tests/ui/crashes/ice-7169.fixed (limited to 'src/tools/clippy/tests/ui/crashes/ice-7169.fixed') diff --git a/src/tools/clippy/tests/ui/crashes/ice-7169.fixed b/src/tools/clippy/tests/ui/crashes/ice-7169.fixed new file mode 100644 index 000000000..cf4077e4d --- /dev/null +++ b/src/tools/clippy/tests/ui/crashes/ice-7169.fixed @@ -0,0 +1,13 @@ +#![allow(clippy::needless_if)] + +#[derive(Default)] +struct A { + a: Vec>, + b: T, +} + +fn main() { + if Ok::<_, ()>(A::::default()).is_ok() {} + //~^ ERROR: redundant pattern matching, consider using `is_ok()` + //~| NOTE: `-D clippy::redundant-pattern-matching` implied by `-D warnings` +} -- cgit v1.2.3