From 1218259e27febce625edfd4e830ecb169036adab Mon Sep 17 00:00:00 2001 From: Samuel Moelius Date: Tue, 26 Nov 2024 12:01:51 -0500 Subject: [PATCH] Make `bool_to_int_with_if` happy For reasons that are unclear to me, I am seeing this lint fire in clippy_lints/src/macro_metavars_in_unsafe.rs. --- clippy_lints/src/macro_metavars_in_unsafe.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_lints/src/macro_metavars_in_unsafe.rs b/clippy_lints/src/macro_metavars_in_unsafe.rs index c597062716ae..f1aea792891c 100644 --- a/clippy_lints/src/macro_metavars_in_unsafe.rs +++ b/clippy_lints/src/macro_metavars_in_unsafe.rs @@ -221,7 +221,7 @@ impl<'tcx> LateLintPass<'tcx> for ExprMetavarsInUnsafe { let mut vis = BodyVisitor { macro_unsafe_blocks: Vec::new(), - expn_depth: if body.value.span.from_expansion() { 1 } else { 0 }, + expn_depth: u32::from(body.value.span.from_expansion()), cx, lint: self, };