diff options
| author | Miguel Guarniz <mi9uel9@gmail.com> | 2022-07-19 17:47:49 -0400 |
|---|---|---|
| committer | Miguel Guarniz <mi9uel9@gmail.com> | 2022-07-29 18:26:10 -0400 |
| commit | ce5fa10cce7a0b550be87da853aef2b5f9a87b1e (patch) | |
| tree | 191594886e475e195a9da2e615e1d93426674f3f | |
| parent | 29a0f69f9c5862f6c81fc7dda6065fb0a0c779b6 (diff) | |
| download | rust-ce5fa10cce7a0b550be87da853aef2b5f9a87b1e.tar.gz rust-ce5fa10cce7a0b550be87da853aef2b5f9a87b1e.zip | |
Change enclosing_body_owner to return LocalDefId
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
| -rw-r--r-- | clippy_utils/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_utils/src/lib.rs b/clippy_utils/src/lib.rs index 34a1cdaf1d5..50bb008098d 100644 --- a/clippy_utils/src/lib.rs +++ b/clippy_utils/src/lib.rs @@ -1353,7 +1353,7 @@ pub fn is_integer_const(cx: &LateContext<'_>, e: &Expr<'_>, value: u128) -> bool if is_integer_literal(e, value) { return true; } - let enclosing_body = cx.tcx.hir().local_def_id(cx.tcx.hir().enclosing_body_owner(e.hir_id)); + let enclosing_body = cx.tcx.hir().enclosing_body_owner(e.hir_id); if let Some((Constant::Int(v), _)) = constant(cx, cx.tcx.typeck(enclosing_body), e) { return value == v; } |
