rust/tests/ui/closures/2229_closure_analysis/migrations/issue-78720.rs

12 lines
238 B
Rust

// 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));
}
}