rust/compiler/rustc_plugin_impl/src/lib.rs

26 lines
747 B
Rust
Raw Normal View History

//! Infrastructure for compiler plugins.
//!
//! Plugins are a deprecated way to extend the behavior of `rustc` in various ways.
//!
2019-04-20 07:45:47 +00:00
//! See the [`plugin`
//! feature](https://doc.rust-lang.org/nightly/unstable-book/language-features/plugin.html)
//! of the Unstable Book for some examples.
2014-05-26 21:48:54 +00:00
#![doc(html_root_url = "https://doc.rust-lang.org/nightly-rustc/")]
2019-02-10 07:13:30 +00:00
#![feature(nll)]
#![recursion_limit = "256"]
use rustc_lint::LintStore;
2018-12-13 15:57:25 +00:00
2014-05-26 21:48:54 +00:00
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,
}