use crate::validate_attr;
use rustc_feature::Features;
use syntax::attr::HasAttrs;
-use syntax::feature_gate::{feature_err, get_features, GateIssue};
+use syntax::feature_gate::{feature_err, get_features};
use syntax::attr;
use syntax::ast;
use syntax::edition::Edition;
} else { // the entire crate is unconfigured
krate.attrs = Vec::new();
krate.module.items = Vec::new();
- return (krate, Features::new());
+ return (krate, Features::default());
}
features = get_features(&sess.span_diagnostic, &krate.attrs, edition, allow_features);
if !attr.has_name(sym::cfg_attr) {
return vec![attr];
}
- if attr.get_normal_item().tokens.is_empty() {
+ if let ast::MacArgs::Empty = attr.get_normal_item().args {
self.sess.span_diagnostic
.struct_span_err(
attr.span,
let mut err = feature_err(self.sess,
sym::stmt_expr_attributes,
attr.span,
- GateIssue::Language,
"attributes on expressions are experimental");
if attr.is_doc_comment() {