-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Move Fn*
traits malformedness protections to typeck
#108138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
r? @TaKO8Ki (rustbot has picked a reviewer for you, use r? to override) |
@bors r+ rollup |
@bors rollup- not convinced this needs to be rolled up always |
⌛ Testing commit 2a700d4 with merge a8db02805ba30bf2063281d42930c63b75622890... |
💔 Test failed - checks-actions |
@bors retry |
The job Click to see the possible cause of the failure (guessed by this bot)
|
☀️ Test successful - checks-actions |
Finished benchmarking commit (3200982): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. |
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
, orFnMut::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 aadd
item that's a const instead of a method.