rustc: feature gates errors should use the new attribute syntax
This commit is contained in:
parent
a27dc534e4
commit
2df7601033
2 changed files with 3 additions and 3 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ fn ast_path_substs<AC:AstConv,RS:RegionScope>(
|
|||
&& !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");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue