about summary refs log tree commit diff
path: root/tests/ui/closures/2229_closure_analysis/migrations/issue-78720.rs
blob: 3e72eec4ea8c6386b3797bd689b724a5164b8716 (plain)
1
2
3
4
5
6
7
8
9
10
11
//@ run-pass

#![warn(rust_2021_incompatible_closure_captures)]
#![allow(dropping_references, dropping_copy_types)]

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