rust/compiler/rustc_ty_utils/src
León Orell Valerian Liehr 6131ba62ad
Rollup merge of #120139 - compiler-errors:fnonce-shim, r=BoxyUwU
Do not normalize closure signature when building `FnOnce` shim

It is not necessary to normalize the closure signature when building an `FnOnce` shim for an `Fn`/`FnMut` closure. That closure shim is just calling `FnMut::call_mut(&mut self)` anyways.

It's also somewhat sketchy that we were ever doing this to begin with, since we're normalizing with a `ParamEnv::reveal_all()` param-env, which is definitely not right with possibly polymorphic substs.

This cuts out a tiny bit of unnecessary work in `Instance::resolve` and simplifies the signature because now we can unconditionally return an `Instance`.
2024-01-23 21:53:56 +01:00
..
abi.rs Rollup merge of #119969 - compiler-errors:simplify-closure-env-ty, r=oli-obk 2024-01-16 17:55:23 +01:00
assoc.rs Move some methods from tcx.hir() to tcx 2023-12-12 06:40:29 -08:00
common_traits.rs Move expansion of query macros in rustc_middle to rustc_middle::query 2023-05-15 08:49:13 +02:00
consts.rs Rollup merge of #119307 - compiler-errors:pat-lifetimes, r=Nadrieril 2023-12-26 13:29:14 -05:00
errors.rs Re-use error code for duplicate error 2023-06-22 15:51:14 +00:00
implied_bounds.rs Move some methods from tcx.hir() to tcx 2023-12-12 06:40:29 -08:00
instance.rs Rollup merge of #120139 - compiler-errors:fnonce-shim, r=BoxyUwU 2024-01-23 21:53:56 +01:00
layout.rs Rollup merge of #119971 - compiler-errors:zip-eq, r=nnethercote 2024-01-15 08:44:49 +01:00
layout_sanity_check.rs fix failure to detect a too-big-type after adding padding 2023-10-27 18:07:53 +02:00
lib.rs Use rustc_fluent_macro::fluent_messages! directly. 2023-11-26 08:38:40 +11:00
needs_drop.rs Remove movability from TyKind::Coroutine 2023-12-28 16:35:01 +00:00
opaque_types.rs Limit impl trait in assoc type defining scope 2024-01-22 14:35:46 +00:00
representability.rs Reduce exposure of some items. 2023-11-20 14:10:19 +11:00
sig_types.rs Move some methods from tcx.hir() to tcx 2023-12-12 06:40:29 -08:00
structural_match.rs Reduce exposure of some items. 2023-11-20 14:10:19 +11:00
ty.rs Movability doesn't need to be a query anymore 2023-12-28 16:35:01 +00:00