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