Skip to content

Commit ce5fa10

Browse files
committed
Change enclosing_body_owner to return LocalDefId
Signed-off-by: Miguel Guarniz <[email protected]>
1 parent 29a0f69 commit ce5fa10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_utils/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,7 @@ pub fn is_integer_const(cx: &LateContext<'_>, e: &Expr<'_>, value: u128) -> bool
13531353
if is_integer_literal(e, value) {
13541354
return true;
13551355
}
1356-
let enclosing_body = cx.tcx.hir().local_def_id(cx.tcx.hir().enclosing_body_owner(e.hir_id));
1356+
let enclosing_body = cx.tcx.hir().enclosing_body_owner(e.hir_id);
13571357
if let Some((Constant::Int(v), _)) = constant(cx, cx.tcx.typeck(enclosing_body), e) {
13581358
return value == v;
13591359
}

0 commit comments

Comments
 (0)