7

Report an error if resolution of closure call functions failed by FabianWolff ·...

 3 years ago
source link: https://github.com/rust-lang/rust/pull/86249
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Copy link

Contributor

FabianWolff commented on Jun 12

This pull request fixes #86238. The current implementation seems to assume that resolution of closure call functions (I'm not sure what the proper term is; I mean call of Fn etc.) can never fail:

None => { span_bug!( self.call_expr.span, "failed to find an overloaded call trait for closure call" ); }

But actually, it can, if the fn/fn_mut/fn_once lang items are not defined, or don't have an associated call/call_mut/call_once function, leading to the ICE described in #86238. I have therefore turned the span_bug!() into an error message, which prevents the ICE.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK