rust/tests/ui/feature-gates/feature-gate-box-expr.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
382 B
Rust
Raw Normal View History

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