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