From bad3edd92532a496c9dfd0b3d09b9df4c38316fe Mon Sep 17 00:00:00 2001 From: lcnr Date: Thu, 31 Oct 2024 12:26:37 +0100 Subject: [PATCH] clippy: we've got a `LateContext` use it for `TypingMode` --- clippy_utils/src/ty.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_utils/src/ty.rs b/clippy_utils/src/ty.rs index c618bfe4488..41785e161d0 100644 --- a/clippy_utils/src/ty.rs +++ b/clippy_utils/src/ty.rs @@ -362,7 +362,7 @@ fn is_normalizable_helper<'tcx>( } // prevent recursive loops, false-negative is better than endless loop leading to stack overflow cache.insert(ty, false); - let infcx = cx.tcx.infer_ctxt().build(TypingMode::from_param_env(param_env)); + let infcx = cx.tcx.infer_ctxt().build(cx.typing_mode()); let cause = ObligationCause::dummy(); let result = if infcx.at(&cause, param_env).query_normalize(ty).is_ok() { match ty.kind() {