rust/compiler/rustc_monomorphize/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
..
collector.rs Rollup merge of #120139 - compiler-errors:fnonce-shim, r=BoxyUwU 2024-01-23 21:53:56 +01:00
errors.rs Stop mentioning internal lang items in no_std binary errors 2024-01-10 21:18:54 +01:00
lib.rs Use rustc_fluent_macro::fluent_messages! directly. 2023-11-26 08:38:40 +11:00
partitioning.rs Rollup merge of #118811 - EbbDrop:is-sorted-by-bool, r=Mark-Simulacrum 2024-01-21 06:38:35 +01:00
polymorphize.rs Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
util.rs subst -> instantiate 2023-09-26 09:37:55 +02:00