about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-02-21 12:59:11 +0000
committerbors <bors@rust-lang.org>2023-02-21 12:59:11 +0000
commit3200982b7689ff496e63584c5c8f9bf707b98ae3 (patch)
tree071a133080769abf4401135167cecb6a8dc8a23f /compiler/rustc_interface/src
parentbda32a4023b1d3f96e56e1b2fc7510324f430316 (diff)
parent2a700d47f592a52ebc32ae41b67cd5da756a17d9 (diff)
downloadrust-3200982b7689ff496e63584c5c8f9bf707b98ae3.tar.gz
rust-3200982b7689ff496e63584c5c8f9bf707b98ae3.zip
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.
Diffstat (limited to 'compiler/rustc_interface/src')
0 files changed, 0 insertions, 0 deletions