Skip to content

Commit 7d39832

Browse files
committed
Document some more core functions
1 parent a27022e commit 7d39832

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

clippy_lints/src/lib.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,14 @@ mod reexport {
256256
crate use syntax::ast::{Name, NodeId};
257257
}
258258

259+
/// Register all pre expansion lints
260+
///
261+
/// Pre-expansion lints run before any macro expansion has happened.
262+
///
263+
/// Note that due to the architechture of the compiler, currently `cfg_attr` attributes will still
264+
/// be expanded even when using a pre-expansion pass.
265+
///
266+
/// Used in `./src/driver.rs`.
259267
pub fn register_pre_expansion_lints(
260268
session: &rustc::session::Session,
261269
store: &mut rustc::lint::LintStore,
@@ -280,6 +288,7 @@ pub fn register_pre_expansion_lints(
280288
store.register_pre_expansion_pass(Some(session), true, false, box dbg_macro::Pass);
281289
}
282290

291+
#[doc(hidden)]
283292
pub fn read_conf(reg: &rustc_plugin::Registry<'_>) -> Conf {
284293
match utils::conf::file_from_args(reg.args()) {
285294
Ok(file_name) => {
@@ -337,6 +346,9 @@ pub fn read_conf(reg: &rustc_plugin::Registry<'_>) -> Conf {
337346
}
338347
}
339348

349+
/// Register all lints and lint groups with the rustc plugin registry
350+
///
351+
/// Used in `./src/driver.rs`.
340352
#[allow(clippy::too_many_lines)]
341353
#[rustfmt::skip]
342354
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) {
10911103
]);
10921104
}
10931105

1106+
/// Register renamed lints.
1107+
///
1108+
/// Used in `./src/driver.rs`.
10941109
pub fn register_renamed(ls: &mut rustc::lint::LintStore) {
10951110
ls.register_renamed("clippy::stutter", "clippy::module_name_repetitions");
10961111
ls.register_renamed("clippy::new_without_default_derive", "clippy::new_without_default");

0 commit comments

Comments
 (0)