summaryrefslogtreecommitdiff
path: root/tests/ui/closures/2229_closure_analysis/migrations/issue-78720.rs
blob: bc7295a0826f15c1088450d44d22fba7e76213cb (plain)
1
2
3
4
5
6
7
8
9
10
11
// run-pass

#![warn(rust_2021_incompatible_closure_captures)]
#![allow(drop_ref, drop_copy)]

fn main() {
    if let a = "" {
        //~^ WARNING: irrefutable `if let` pattern
        drop(|_: ()| drop(a));
    }
}