diff options
| author | Erick Tryzelaar <erick.tryzelaar@gmail.com> | 2014-04-20 07:33:04 -0700 |
|---|---|---|
| committer | Erick Tryzelaar <erick.tryzelaar@gmail.com> | 2014-04-20 07:33:04 -0700 |
| commit | 2df76010335e9d486951ae995f0e5a0fc7c8e06f (patch) | |
| tree | dbcc9bc5959da7b9557f98dd855444893e9d0e14 | |
| parent | a27dc534e4dd01b9fb5cf7c5c30f2b2694b78d85 (diff) | |
| download | rust-2df76010335e9d486951ae995f0e5a0fc7c8e06f.tar.gz rust-2df76010335e9d486951ae995f0e5a0fc7c8e06f.zip | |
rustc: feature gates errors should use the new attribute syntax
| -rw-r--r-- | src/librustc/front/feature_gate.rs | 4 | ||||
| -rw-r--r-- | src/librustc/middle/typeck/astconv.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc/front/feature_gate.rs b/src/librustc/front/feature_gate.rs index 0f76075656e..5bca018c3ee 100644 --- a/src/librustc/front/feature_gate.rs +++ b/src/librustc/front/feature_gate.rs @@ -16,7 +16,7 @@ //! enabled. //! //! Features are enabled in programs via the crate-level attributes of -//! #[feature(...)] with a comma-separated list of features. +//! #![feature(...)] with a comma-separated list of features. use middle::lint; @@ -324,7 +324,7 @@ pub fn check_crate(sess: &Session, krate: &ast::Crate) { match attr.meta_item_list() { None => { sess.span_err(attr.span, "malformed feature attribute, \ - expected #[feature(...)]"); + expected #![feature(...)]"); } Some(list) => { for &mi in list.iter() { diff --git a/src/librustc/middle/typeck/astconv.rs b/src/librustc/middle/typeck/astconv.rs index 99f10395437..9be1453bfda 100644 --- a/src/librustc/middle/typeck/astconv.rs +++ b/src/librustc/middle/typeck/astconv.rs @@ -219,7 +219,7 @@ fn ast_path_substs<AC:AstConv,RS:RegionScope>( && !this.tcx().sess.features.default_type_params.get() { this.tcx().sess.span_err(path.span, "default type parameters are \ experimental and possibly buggy"); - this.tcx().sess.span_note(path.span, "add #[feature(default_type_params)] \ + this.tcx().sess.span_note(path.span, "add #![feature(default_type_params)] \ to the crate attributes to enable"); } |
