]> git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/crashes/ice-7169.fixed
New upstream version 1.74.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / crashes / ice-7169.fixed
1 #![allow(clippy::needless_if)]
2
3 #[derive(Default)]
4 struct A<T> {
5 a: Vec<A<T>>,
6 b: T,
7 }
8
9 fn main() {
10 if Ok::<_, ()>(A::<String>::default()).is_ok() {}
11 //~^ ERROR: redundant pattern matching, consider using `is_ok()`
12 //~| NOTE: `-D clippy::redundant-pattern-matching` implied by `-D warnings`
13 }