]> git.proxmox.com Git - rustc.git/blob - src/librustc_plugin_impl/lib.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / src / librustc_plugin_impl / lib.rs
1 //! Infrastructure for compiler plugins.
2 //!
3 //! Plugins are a deprecated way to extend the behavior of `rustc` in various ways.
4 //!
5 //! See the [`plugin`
6 //! feature](https://doc.rust-lang.org/nightly/unstable-book/language-features/plugin.html)
7 //! of the Unstable Book for some examples.
8
9 #![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
10
11 #![feature(nll)]
12
13 use rustc::lint::LintStore;
14
15 pub mod build;
16 pub mod load;
17
18 /// Structure used to register plugins.
19 ///
20 /// A plugin registrar function takes an `&mut Registry` and should call
21 /// methods to register its plugins.
22 pub struct Registry<'a> {
23 /// The `LintStore` allows plugins to register new lints.
24 pub lint_store: &'a mut LintStore,
25 }