mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
18 lines
719 B
Rust
18 lines
719 B
Rust
// For historical reasons, box patterns don't have an erroring pre-expansion feature gate.
|
|
// We're now at least issuing a warning for those that only exist before macro expansion.
|
|
// FIXME(#154045): Turn this pre-expansion warning into an error and remove the post-expansion gate.
|
|
// As part of this, move these test cases into `feature-gate-box_patterns.rs`.
|
|
//@ check-pass
|
|
|
|
fn main() {
|
|
#[cfg(false)]
|
|
let box x;
|
|
//~^ WARN box pattern syntax is experimental
|
|
//~| WARN unstable syntax can change at any point in the future
|
|
|
|
#[cfg(false)]
|
|
let Packet { box x };
|
|
//~^ WARN box pattern syntax is experimental
|
|
//~| WARN unstable syntax can change at any point in the future
|
|
}
|