Skip to content

Commit acfc823

Browse files
Split lints module to prepare for multiple lints
1 parent 750db09 commit acfc823

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

src/librustc_mir_build/build/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ fn mir_build(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Body<'_> {
181181
build::construct_const(cx, body_id, return_ty, return_ty_span)
182182
};
183183

184-
lints::check(tcx, &body, def_id);
184+
lints::unconditional_recursion::check(tcx, &body, def_id);
185185

186186
// The borrow checker will replace all the regions here with its own
187187
// inference variables. There's no point having non-erased regions here.

src/librustc_mir_build/lints/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//! Lints that run immediately after MIR building.
2+
//!
3+
//! By running these before any MIR transformations, we ensure that the MIR is as close to the
4+
//! user's code as possible.
5+
6+
pub mod unconditional_recursion;

0 commit comments

Comments
 (0)