about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-06-01 19:07:03 +0000
committerbors <bors@rust-lang.org>2024-06-01 19:07:03 +0000
commitab45660c75d2a4088bbbd78c7c089cf39568693e (patch)
tree6e650f05886e763681a8d141f7d2a873ee8c2f99
parent2334264463eee8aab8c4ebd642f80131d60603b8 (diff)
parent5a44877a394569261cd53b23003113272349cf68 (diff)
downloadrust-ab45660c75d2a4088bbbd78c7c089cf39568693e.tar.gz
rust-ab45660c75d2a4088bbbd78c7c089cf39568693e.zip
Auto merge of #125775 - compiler-errors:uplift-closure-args, r=lcnr
Uplift `{Closure,Coroutine,CoroutineClosure}Args` and friends to `rustc_type_ir`

Part of converting the new solver's `structural_traits.rs` to be interner-agnostic.

I decided against aliasing `ClosureArgs<TyCtxt<'tcx>>` to `ClosureArgs<'tcx>` because it seemed so rare. I could do so if desired, though.

r? lcnr
-rw-r--r--clippy_lints/src/eta_reduction.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/eta_reduction.rs b/clippy_lints/src/eta_reduction.rs
index b58018ca035..48c4c4206fe 100644
--- a/clippy_lints/src/eta_reduction.rs
+++ b/clippy_lints/src/eta_reduction.rs
@@ -10,7 +10,7 @@ use rustc_infer::infer::TyCtxtInferExt;
 use rustc_lint::{LateContext, LateLintPass};
 use rustc_middle::ty::{
     self, Binder, ClosureArgs, ClosureKind, FnSig, GenericArg, GenericArgKind, List, Region, RegionKind, Ty,
-    TypeVisitableExt, TypeckResults,
+    TypeVisitableExt, TypeckResults, TyCtxt,
 };
 use rustc_session::declare_lint_pass;
 use rustc_span::symbol::sym;
@@ -240,7 +240,7 @@ fn check_inputs(
         })
 }
 
-fn check_sig<'tcx>(cx: &LateContext<'tcx>, closure: ClosureArgs<'tcx>, call_sig: FnSig<'_>) -> bool {
+fn check_sig<'tcx>(cx: &LateContext<'tcx>, closure: ClosureArgs<TyCtxt<'tcx>>, call_sig: FnSig<'_>) -> bool {
     call_sig.safety == Safety::Safe
         && !has_late_bound_to_non_late_bound_regions(
             cx.tcx.signature_unclosure(closure.sig(), Safety::Safe).skip_binder(),