rust/compiler/rustc_hir_analysis/src
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
..
astconv Rollup merge of #108265 - lcnr:cg-error-msg, r=BoxyUwU 2023-02-20 14:32:56 +01:00
check Auto merge of #108138 - compiler-errors:malformed-fn-trait, r=TaKO8Ki 2023-02-21 12:59:11 +00:00
coherence Auto merge of #108075 - WaffleLapkin:de-arena-allocates-you-OwO, r=Nilstrieb 2023-02-17 17:42:51 +00:00
collect Move late-bound arg type checks to resolve_bound_vars 2023-02-18 03:28:54 +00:00
impl_wf_check add predicate evaluation logic 2023-02-17 09:32:39 +00:00
outlives Add Clause::ConstArgHasType variant 2023-02-17 09:30:33 +00:00
structured_errors Copy ty::AssocItem all other the place 2023-02-15 20:22:41 +00:00
variance remove bound_type_of query; make type_of return EarlyBinder; change type_of in metadata 2023-02-16 17:05:56 -07:00
autoderef.rs fix: use LocalDefId instead of HirId in trait res 2023-01-23 11:42:18 +00:00
bounds.rs Rework hir Bounds collection 2022-12-28 23:40:09 +00:00
check_unused.rs Use expect_{use,fn} in a couple of places 2023-01-30 05:50:37 +00:00
collect.rs Auto merge of #107753 - kylematsuda:type-of, r=BoxyUwU 2023-02-17 04:45:15 +00:00
constrained_generic_params.rs Make visiting traits generic over the Interner 2023-02-13 10:24:49 +00:00
errors.rs Move autoderef to rustc_hir_analysis 2023-01-11 20:12:57 +00:00
hir_wf_check.rs Rename folder traits' tcx method to interner 2023-02-13 10:24:51 +00:00
impl_wf_check.rs remove bound_type_of query; make type_of return EarlyBinder; change type_of in metadata 2023-02-16 17:05:56 -07:00
lib.rs Use IntoIterator for mk_fn_sig. 2023-02-17 22:24:34 +11:00
structured_errors.rs rustc_typeck to rustc_hir_analysis 2022-09-27 10:37:23 +02:00