mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
120d3570aa
Co-authored-by: Deadbeef <ent3rm4n@gmail.com>
10 lines
336 B
Rust
10 lines
336 B
Rust
fn main() {
|
|
// We reuse the `box` syntax so this doesn't actually test the feature gate but eh.
|
|
let box x = Box::new('c'); //~ ERROR box pattern syntax is experimental
|
|
println!("x: {}", x);
|
|
|
|
// `box` syntax is allowed to be cfg-ed out for historical reasons (#65742).
|
|
#[cfg(FALSE)]
|
|
let box _x = Box::new('c');
|
|
}
|