Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Generalize all error messages with "experimental in alpha release" to
just say "experimental."
  • Loading branch information
pnkfelix committed Feb 11, 2015
1 parent dbe0828 commit cdd8a5a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/libsyntax/feature_gate.rs
Expand Up @@ -430,7 +430,7 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
ast::ExprBox(..) | ast::ExprUnary(ast::UnOp::UnUniq, _) => {
self.gate_feature("box_syntax",
e.span,
"box expression syntax is experimental in alpha release; \
"box expression syntax is experimental; \
you can call `Box::new` instead.");
}
ast::ExprLit(ref lit) => {
Expand Down
6 changes: 3 additions & 3 deletions src/test/compile-fail/feature-gate-box-expr.rs
Expand Up @@ -11,13 +11,13 @@
fn main() {
use std::boxed::HEAP;

let x = box 'c'; //~ ERROR box expression syntax is experimental in alpha release
let x = box 'c'; //~ ERROR box expression syntax is experimental
println!("x: {}", x);

let x = box () 'c'; //~ ERROR box expression syntax is experimental in alpha release
let x = box () 'c'; //~ ERROR box expression syntax is experimental
println!("x: {}", x);

let x = box (HEAP) 'c'; //~ ERROR box expression syntax is experimental in alpha release
let x = box (HEAP) 'c'; //~ ERROR box expression syntax is experimental
println!("x: {}", x);
}

2 changes: 1 addition & 1 deletion src/test/compile-fail/feature-gate-box-pat.rs
Expand Up @@ -9,6 +9,6 @@
// except according to those terms.

fn main() {
let box x = Box::new('c'); //~ ERROR box pattern syntax is experimental in alpha release
let box x = Box::new('c'); //~ ERROR box pattern syntax is experimental
println!("x: {}", x);
}

0 comments on commit cdd8a5a

Please sign in to comment.