librustc: Improve error message for missing feature attributes.

This commit is contained in:
Kevin Butler 2014-04-12 00:25:32 +01:00
parent 8b6091e8f1
commit c48a3efb17
2 changed files with 2 additions and 2 deletions

View File

@ -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));
}

View File

@ -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");
}