about summary refs log tree commit diff
path: root/src/librustc_interface
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-09-14 19:36:41 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-09-14 21:54:26 +0300
commit966d96c9d2f16fd66eefda2eac25126a353bbb3a (patch)
treef9fe0437b7abcb848f136e1f1e67333aa88e5375 /src/librustc_interface
parentca3766e2e58f462a20922e42c821a37eaf0e13db (diff)
feature_gate: Remove dead code from attribute checking
Same checks are performed during name resolution, and all attributes go through name resolution now
Diffstat (limited to 'src/librustc_interface')
-rw-r--r--src/librustc_interface/passes.rs11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/librustc_interface/passes.rs b/src/librustc_interface/passes.rs
index 3cfae1686df..e8e8da67334 100644
--- a/src/librustc_interface/passes.rs
+++ b/src/librustc_interface/passes.rs
@@ -41,7 +41,6 @@ use syntax::mut_visit::MutVisitor;
 use syntax::parse::{self, PResult};
 use syntax::util::node_count::NodeCounter;
 use syntax::symbol::Symbol;
-use syntax::feature_gate::AttributeType;
 use syntax_pos::FileName;
 use syntax_ext;
 
@@ -219,7 +218,6 @@ impl BoxedResolver {
 
 pub struct PluginInfo {
     syntax_exts: Vec<NamedSyntaxExtension>,
-    attributes: Vec<(Symbol, AttributeType)>,
 }
 
 pub fn register_plugins<'a>(
@@ -312,12 +310,9 @@ pub fn register_plugins<'a>(
     }
 
     *sess.plugin_llvm_passes.borrow_mut() = llvm_passes;
-    *sess.plugin_attributes.borrow_mut() = attributes.clone();
+    *sess.plugin_attributes.borrow_mut() = attributes;
 
-    Ok((krate, PluginInfo {
-        syntax_exts,
-        attributes,
-    }))
+    Ok((krate, PluginInfo { syntax_exts }))
 }
 
 fn configure_and_expand_inner<'a>(
@@ -329,7 +324,6 @@ fn configure_and_expand_inner<'a>(
     crate_loader: &'a mut CrateLoader<'a>,
     plugin_info: PluginInfo,
 ) -> Result<(ast::Crate, Resolver<'a>)> {
-    let attributes = plugin_info.attributes;
     time(sess, "pre ast expansion lint checks", || {
         lint::check_ast_crate(
             sess,
@@ -522,7 +516,6 @@ fn configure_and_expand_inner<'a>(
             &krate,
             &sess.parse_sess,
             &sess.features_untracked(),
-            &attributes,
             sess.opts.unstable_features,
         );
     });