Skip to content

Commit c48a3ef

Browse files
committed
librustc: Improve error message for missing feature attributes.
1 parent 8b6091e commit c48a3ef

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/librustc/front/feature_gate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ impl<'a> Context<'a> {
9696
fn gate_feature(&self, feature: &str, span: Span, explain: &str) {
9797
if !self.has_feature(feature) {
9898
self.sess.span_err(span, explain);
99-
self.sess.span_note(span, format!("add \\#[feature({})] to the \
99+
self.sess.span_note(span, format!("add \\#![feature({})] to the \
100100
crate attributes to enable",
101101
feature));
102102
}

src/librustc/middle/typeck/check/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3714,7 +3714,7 @@ pub fn instantiate_path(fcx: &FnCtxt,
37143714
&& !fcx.tcx().sess.features.default_type_params.get() {
37153715
fcx.tcx().sess.span_err(pth.span, "default type parameters are \
37163716
experimental and possibly buggy");
3717-
fcx.tcx().sess.span_note(pth.span, "add #[feature(default_type_params)] \
3717+
fcx.tcx().sess.span_note(pth.span, "add #![feature(default_type_params)] \
37183718
to the crate attributes to enable");
37193719
}
37203720

0 commit comments

Comments
 (0)