about summary refs log tree commit diff
path: root/src/librustc_plugin_impl
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-11-30 15:35:25 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-12-01 20:53:25 +0300
commite5944a5a698a0a9dd3acbb14d8309a2b72cd9160 (patch)
tree2ad43c68768c54a249616ea0bf0aca7f54f0d75c /src/librustc_plugin_impl
parent279937812aaf018f9d50bd70d84b369d41a13f4f (diff)
downloadrust-e5944a5a698a0a9dd3acbb14d8309a2b72cd9160.tar.gz
rust-e5944a5a698a0a9dd3acbb14d8309a2b72cd9160.zip
rustc_plugin: Some further cleanup
Remove a useless test
Diffstat (limited to 'src/librustc_plugin_impl')
-rw-r--r--src/librustc_plugin_impl/lib.rs16
-rw-r--r--src/librustc_plugin_impl/load.rs2
-rw-r--r--src/librustc_plugin_impl/registry.rs36
3 files changed, 12 insertions, 42 deletions
diff --git a/src/librustc_plugin_impl/lib.rs b/src/librustc_plugin_impl/lib.rs
index f4e90b7b7da..5c4ea39aecc 100644
--- a/src/librustc_plugin_impl/lib.rs
+++ b/src/librustc_plugin_impl/lib.rs
@@ -10,10 +10,16 @@
 
 #![feature(nll)]
 
-#![recursion_limit="256"]
+use rustc::lint::LintStore;
 
-pub use registry::Registry;
-
-pub mod registry;
-pub mod load;
 pub mod build;
+pub mod load;
+
+/// Structure used to register plugins.
+///
+/// A plugin registrar function takes an `&mut Registry` and should call
+/// methods to register its plugins.
+pub struct Registry<'a> {
+    /// The `LintStore` allows plugins to register new lints.
+    pub lint_store: &'a mut LintStore,
+}
diff --git a/src/librustc_plugin_impl/load.rs b/src/librustc_plugin_impl/load.rs
index 6f2af6895e4..0bd91076592 100644
--- a/src/librustc_plugin_impl/load.rs
+++ b/src/librustc_plugin_impl/load.rs
@@ -3,7 +3,7 @@
 use rustc::middle::cstore::MetadataLoader;
 use rustc::session::Session;
 use rustc_metadata::locator;
-use crate::registry::Registry;
+use crate::Registry;
 
 use std::borrow::ToOwned;
 use std::env;
diff --git a/src/librustc_plugin_impl/registry.rs b/src/librustc_plugin_impl/registry.rs
deleted file mode 100644
index fb749050756..00000000000
--- a/src/librustc_plugin_impl/registry.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-//! Used by plugin crates to tell `rustc` about the plugins they provide.
-
-use rustc::lint::LintStore;
-use rustc::session::Session;
-use syntax_pos::Span;
-
-/// Structure used to register plugins.
-///
-/// A plugin registrar function takes an `&mut Registry` and should call
-/// methods to register its plugins.
-///
-/// This struct has public fields and other methods for use by `rustc`
-/// itself. They are not documented here, and plugin authors should
-/// not use them.
-pub struct Registry<'a> {
-    /// Compiler session. Useful if you want to emit diagnostic messages
-    /// from the plugin registrar.
-    pub sess: &'a Session,
-
-    /// The `LintStore` allows plugins to register new lints.
-    pub lint_store: &'a mut LintStore,
-
-    #[doc(hidden)]
-    pub krate_span: Span,
-}
-
-impl<'a> Registry<'a> {
-    #[doc(hidden)]
-    pub fn new(sess: &'a Session, lint_store: &'a mut LintStore, krate_span: Span) -> Registry<'a> {
-        Registry {
-            sess,
-            lint_store,
-            krate_span,
-        }
-    }
-}