Skip to content

Commit 1218259

Browse files
committed
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.
1 parent 61f691f commit 1218259

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/macro_metavars_in_unsafe.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ impl<'tcx> LateLintPass<'tcx> for ExprMetavarsInUnsafe {
221221

222222
let mut vis = BodyVisitor {
223223
macro_unsafe_blocks: Vec::new(),
224-
expn_depth: if body.value.span.from_expansion() { 1 } else { 0 },
224+
expn_depth: u32::from(body.value.span.from_expansion()),
225225
cx,
226226
lint: self,
227227
};

0 commit comments

Comments
 (0)