rustc: feature gates errors should use the new attribute syntax

This commit is contained in:
Erick Tryzelaar 2014-04-20 07:33:04 -07:00
parent a27dc534e4
commit 2df7601033
2 changed files with 3 additions and 3 deletions

View file

@ -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() {

View file

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