librustc: Improve error message for missing feature attributes.
This commit is contained in:
parent
8b6091e8f1
commit
c48a3efb17
2 changed files with 2 additions and 2 deletions
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue