mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
15 lines
382 B
Rust
15 lines
382 B
Rust
// gate-test-box_syntax
|
|
|
|
// Check that `box EXPR` is feature-gated.
|
|
//
|
|
// See also feature-gate-placement-expr.rs
|
|
//
|
|
// (Note that the two tests are separated since the checks appear to
|
|
// be performed at distinct phases, with an abort_if_errors call
|
|
// separating them.)
|
|
|
|
fn main() {
|
|
let x = box 'c'; //~ ERROR box expression syntax is experimental
|
|
println!("x: {}", x);
|
|
}
|