diff options
| author | Simonas Kazlauskas <git@kazlauskas.me> | 2017-03-03 19:11:34 +0200 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2017-03-10 08:09:29 -0800 |
| commit | 4ca9c97ace17ca0232bf6f83c06a8a8245614de5 (patch) | |
| tree | f13643e511a2e31ea8c3e624a717a0cb885043f0 /src/librustc_plugin | |
| parent | f573db4f80c75f156df8a743f456bf087ec81dc2 (diff) | |
| download | rust-4ca9c97ace17ca0232bf6f83c06a8a8245614de5.tar.gz rust-4ca9c97ace17ca0232bf6f83c06a8a8245614de5.zip | |
Remove ability for plugins to register a MIR pass
In recent months there have been a few different people investigating how to make a plugin that registers a MIR-pass – one that isn’t intended to be eventually merged into rustc proper. The interface to register MIR passes was added primarily for miri (& later was found to make prototyping of rustc-proper MIR passes a tiny bit faster). Since miri does not use this interface anymore it seems like a good time to remove this "feature". For prototyping purposes a similar interface can be added by developers themselves in their custom rustc build.
Diffstat (limited to 'src/librustc_plugin')
| -rw-r--r-- | src/librustc_plugin/registry.rs | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/librustc_plugin/registry.rs b/src/librustc_plugin/registry.rs index 3700d0295e9..cdde56f5f63 100644 --- a/src/librustc_plugin/registry.rs +++ b/src/librustc_plugin/registry.rs @@ -13,8 +13,6 @@ use rustc::lint::{EarlyLintPassObject, LateLintPassObject, LintId, Lint}; use rustc::session::Session; -use rustc::mir::transform::MirMapPass; - use syntax::ext::base::{SyntaxExtension, NamedSyntaxExtension, NormalTT, IdentTT}; use syntax::ext::base::MacroExpanderFn; use syntax::symbol::Symbol; @@ -54,9 +52,6 @@ pub struct Registry<'a> { pub late_lint_passes: Vec<LateLintPassObject>, #[doc(hidden)] - pub mir_passes: Vec<Box<for<'pcx> MirMapPass<'pcx>>>, - - #[doc(hidden)] pub lint_groups: HashMap<&'static str, Vec<LintId>>, #[doc(hidden)] @@ -81,7 +76,6 @@ impl<'a> Registry<'a> { lint_groups: HashMap::new(), llvm_passes: vec![], attributes: vec![], - mir_passes: Vec::new(), whitelisted_custom_derives: Vec::new(), } } @@ -157,11 +151,6 @@ impl<'a> Registry<'a> { self.lint_groups.insert(name, to.into_iter().map(|x| LintId::of(x)).collect()); } - /// Register a MIR pass - pub fn register_mir_pass(&mut self, pass: Box<for<'pcx> MirMapPass<'pcx>>) { - self.mir_passes.push(pass); - } - /// Register an LLVM pass. /// /// Registration with LLVM itself is handled through static C++ objects with |
