about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPhilipp Hansch <dev@phansch.net>2019-02-11 07:59:57 +0100
committerPhilipp Hansch <dev@phansch.net>2019-02-11 08:34:37 +0100
commit7d3983216fae04263ae244a3741e9f7bfbbbfa96 (patch)
treeb9ce20277dfc082dda7c872464344384b2c326df
parenta27022e0dcce519963db69231d4d866ba0de7b8b (diff)
downloadrust-7d3983216fae04263ae244a3741e9f7bfbbbfa96.tar.gz
rust-7d3983216fae04263ae244a3741e9f7bfbbbfa96.zip
Document some more core functions
-rw-r--r--clippy_lints/src/lib.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs
index 5a5f968a2cf..56c994b5c26 100644
--- a/clippy_lints/src/lib.rs
+++ b/clippy_lints/src/lib.rs
@@ -256,6 +256,14 @@ mod reexport {
     crate use syntax::ast::{Name, NodeId};
 }
 
+/// Register all pre expansion lints
+///
+/// Pre-expansion lints run before any macro expansion has happened.
+///
+/// Note that due to the architechture of the compiler, currently `cfg_attr` attributes will still
+/// be expanded even when using a pre-expansion pass.
+///
+/// Used in `./src/driver.rs`.
 pub fn register_pre_expansion_lints(
     session: &rustc::session::Session,
     store: &mut rustc::lint::LintStore,
@@ -280,6 +288,7 @@ pub fn register_pre_expansion_lints(
     store.register_pre_expansion_pass(Some(session), true, false, box dbg_macro::Pass);
 }
 
+#[doc(hidden)]
 pub fn read_conf(reg: &rustc_plugin::Registry<'_>) -> Conf {
     match utils::conf::file_from_args(reg.args()) {
         Ok(file_name) => {
@@ -337,6 +346,9 @@ pub fn read_conf(reg: &rustc_plugin::Registry<'_>) -> Conf {
     }
 }
 
+/// Register all lints and lint groups with the rustc plugin registry
+///
+/// Used in `./src/driver.rs`.
 #[allow(clippy::too_many_lines)]
 #[rustfmt::skip]
 pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
@@ -1091,6 +1103,9 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
     ]);
 }
 
+/// Register renamed lints.
+///
+/// Used in `./src/driver.rs`.
 pub fn register_renamed(ls: &mut rustc::lint::LintStore) {
     ls.register_renamed("clippy::stutter", "clippy::module_name_repetitions");
     ls.register_renamed("clippy::new_without_default_derive", "clippy::new_without_default");