rust/compiler/rustc_hir_analysis/src/check
bors 3200982b76 Auto merge of #108138 - compiler-errors:malformed-fn-trait, r=TaKO8Ki
Move `Fn*` traits malformedness protections to typeck

I found it strange that we were doing a custom well-formedness check just for the `Fn*` traits' `call_*` fn items. My understanding from the git history is that this is just to avoid ICEs later on in typeck.

Well, that well-formedness check isn't even implemented correctly for `FnOnce::call_once`, or `FnMut::call_mut` for that matter. Instead, this PR just makes the typeck checks more robust, and leaves it up to the call-site to report errors when lang items are implemented in funny ways.

This coincidentally fixes another ICE where a the `Add` lang item is implemented with a `add` item that's a const instead of a method.
2023-02-21 12:59:11 +00:00
..
check.rs Auto merge of #108075 - WaffleLapkin:de-arena-allocates-you-OwO, r=Nilstrieb 2023-02-17 17:42:51 +00:00
compare_impl_item.rs Auto merge of #108112 - nnethercote:clarify-iterator-interners, r=oli-obk,compiler-errors 2023-02-18 00:20:52 +00:00
dropck.rs remove bound_type_of query; make type_of return EarlyBinder; change type_of in metadata 2023-02-16 17:05:56 -07:00
intrinsic.rs Replace more mk_foo calls with infer_foo. 2023-02-17 22:24:34 +11:00
intrinsicck.rs fix new usage of type_of 2023-02-16 17:05:59 -07:00
mod.rs Auto merge of #108075 - WaffleLapkin:de-arena-allocates-you-OwO, r=Nilstrieb 2023-02-17 17:42:51 +00:00
region.rs Auto merge of #106090 - WaffleLapkin:dereffffffffff, r=Nilstrieb 2023-01-20 04:52:28 +00:00
wfcheck.rs Auto merge of #108138 - compiler-errors:malformed-fn-trait, r=TaKO8Ki 2023-02-21 12:59:11 +00:00