Skip to content

Commit 2df7601

Browse files
committed
rustc: feature gates errors should use the new attribute syntax
1 parent a27dc53 commit 2df7601

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/librustc/front/feature_gate.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
//! enabled.
1717
//!
1818
//! Features are enabled in programs via the crate-level attributes of
19-
//! #[feature(...)] with a comma-separated list of features.
19+
//! #![feature(...)] with a comma-separated list of features.
2020
2121
use middle::lint;
2222

@@ -324,7 +324,7 @@ pub fn check_crate(sess: &Session, krate: &ast::Crate) {
324324
match attr.meta_item_list() {
325325
None => {
326326
sess.span_err(attr.span, "malformed feature attribute, \
327-
expected #[feature(...)]");
327+
expected #![feature(...)]");
328328
}
329329
Some(list) => {
330330
for &mi in list.iter() {

src/librustc/middle/typeck/astconv.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ fn ast_path_substs<AC:AstConv,RS:RegionScope>(
219219
&& !this.tcx().sess.features.default_type_params.get() {
220220
this.tcx().sess.span_err(path.span, "default type parameters are \
221221
experimental and possibly buggy");
222-
this.tcx().sess.span_note(path.span, "add #[feature(default_type_params)] \
222+
this.tcx().sess.span_note(path.span, "add #![feature(default_type_params)] \
223223
to the crate attributes to enable");
224224
}
225225

0 commit comments

Comments
 (0)