mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
fe8f66e4bc
Fixes #125058
18 lines
380 B
Rust
18 lines
380 B
Rust
//@ run-pass
|
|
//@ edition: 2024
|
|
//@ compile-flags: -Zunstable-options
|
|
|
|
#![allow(incomplete_features)]
|
|
#![feature(ref_pat_eat_one_layer_2024)]
|
|
|
|
struct Foo;
|
|
//~^ WARN struct `Foo` is never constructed
|
|
|
|
fn main() {
|
|
|| {
|
|
//~^ WARN unused closure that must be used
|
|
if let Some(Some(&mut x)) = &mut Some(&mut Some(0)) {
|
|
let _: u32 = x;
|
|
}
|
|
};
|
|
}
|