diff --git a/src/librustc/front/feature_gate.rs b/src/librustc/front/feature_gate.rs index 0f76075656e02..5bca018c3eeb2 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 99f10395437a5..9be1453bfda1e 100644 --- a/src/librustc/middle/typeck/astconv.rs +++ b/src/librustc/middle/typeck/astconv.rs @@ -219,7 +219,7 @@ fn ast_path_substs( && !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"); }