From 2df76010335e9d486951ae995f0e5a0fc7c8e06f Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Sun, 20 Apr 2014 07:33:04 -0700 Subject: [PATCH] rustc: feature gates errors should use the new attribute syntax --- src/librustc/front/feature_gate.rs | 4 ++-- 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( && !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"); }