about summary refs log tree commit diff
diff options
context:
space:
mode:
authorKevin Butler <haqkrs@gmail.com>2014-04-12 00:25:32 +0100
committerKevin Butler <haqkrs@gmail.com>2014-04-12 00:25:32 +0100
commitc48a3efb17f20453a44260411f87a6818cbcf8dd (patch)
tree17d3dbbed82ec3ea5149c2d2d4cbac9366abf99b
parent8b6091e8f1f5531fe907f84b6a2b27af04a95e8f (diff)
downloadrust-c48a3efb17f20453a44260411f87a6818cbcf8dd.tar.gz
rust-c48a3efb17f20453a44260411f87a6818cbcf8dd.zip
librustc: Improve error message for missing feature attributes.
-rw-r--r--src/librustc/front/feature_gate.rs2
-rw-r--r--src/librustc/middle/typeck/check/mod.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc/front/feature_gate.rs b/src/librustc/front/feature_gate.rs
index 5c0b9c89565..4412093c6eb 100644
--- a/src/librustc/front/feature_gate.rs
+++ b/src/librustc/front/feature_gate.rs
@@ -96,7 +96,7 @@ impl<'a> Context<'a> {
     fn gate_feature(&self, feature: &str, span: Span, explain: &str) {
         if !self.has_feature(feature) {
             self.sess.span_err(span, explain);
-            self.sess.span_note(span, format!("add \\#[feature({})] to the \
+            self.sess.span_note(span, format!("add \\#![feature({})] to the \
                                                   crate attributes to enable",
                                                  feature));
         }
diff --git a/src/librustc/middle/typeck/check/mod.rs b/src/librustc/middle/typeck/check/mod.rs
index 3c28f2bac27..6898713c765 100644
--- a/src/librustc/middle/typeck/check/mod.rs
+++ b/src/librustc/middle/typeck/check/mod.rs
@@ -3714,7 +3714,7 @@ pub fn instantiate_path(fcx: &FnCtxt,
             && !fcx.tcx().sess.features.default_type_params.get() {
             fcx.tcx().sess.span_err(pth.span, "default type parameters are \
                                                experimental and possibly buggy");
-            fcx.tcx().sess.span_note(pth.span, "add #[feature(default_type_params)] \
+            fcx.tcx().sess.span_note(pth.span, "add #![feature(default_type_params)] \
                                                 to the crate attributes to enable");
         }