]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_plugin_impl/src/lib.rs
Auto merge of #103071 - wesleywiser:fix_inlined_line_numbers, r=davidtwco
[rust.git] / compiler / rustc_plugin_impl / src / 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/nightly-rustc/")]
10 #![recursion_limit = "256"]
11 #![deny(rustc::untranslatable_diagnostic)]
12 #![deny(rustc::diagnostic_outside_of_impl)]
13
14 use rustc_lint::LintStore;
15
16 mod errors;
17 pub mod load;
18
19 /// Structure used to register plugins.
20 ///
21 /// A plugin registrar function takes an `&mut Registry` and should call
22 /// methods to register its plugins.
23 pub struct Registry<'a> {
24     /// The `LintStore` allows plugins to register new lints.
25     pub lint_store: &'a mut LintStore,
26 }