Skip to content

Conversation

@barosl
Copy link
Contributor

@barosl barosl commented Jan 10, 2015

If a type that cannot be called as a function is called, and the result is assigned to a variable, the "unexpected callee type" ICE occurs.

Fixes #20714.
Fixes #20842.
Fixes #20862.

@rust-highfive
Copy link
Contributor

r? @pcwalton

(rust_highfive has picked a reviewer for you, use r? to override)

@nikomatsakis
Copy link
Contributor

From IRC:

[11:48:39] <nmatsakis> barosl: I have mixed feelings; we used to do this, but it made it hard to know when errors would be reported, in turn making it hard to write reliable test cases
[11:48:57] <nmatsakis> in general I've been modifying instead to have things return Err() in theoretically impossible cases

@barosl barosl force-pushed the unexpected-callee-type-ice branch 2 times, most recently from 18b8765 to 5a0d98c Compare January 11, 2015 10:44
@alexcrichton
Copy link
Member

re-r? @nikomatsakis

If a type that cannot be called as a function is called, and the result
is assigned to a variable, the "unexpected callee type" ICE occurs.

Fixes rust-lang#20714.
Fixes rust-lang#20842.
Fixes rust-lang#20862.
@barosl barosl force-pushed the unexpected-callee-type-ice branch from 5a0d98c to 7e24b98 Compare January 20, 2015 16:43
@nikomatsakis
Copy link
Contributor

I'm still not particularly keen on this patch. I'd rather make EUV more tolerant somehow. I'm torn between just returning rather than calling span_bug or possibly having the delegate have a fn tolerate_errors(&self) -> bool method that is only true during typeck. That seems nicer. @barosl what do you think of that?

@nikomatsakis
Copy link
Contributor

I apologize for the extreme delay in responding on this bug. Believe it or not I am digging myself out of a github notification hole that has accumulated and only saw @alexcrichton's comments now.

@alexcrichton
Copy link
Member

ping @nikomatsakis

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

20714 is already fixed fwiw

@nikomatsakis
Copy link
Contributor

It seems that two out of the three relevant issues have been fixed. Given how old and inactive this PR is, I'm going to close it. Feel free to re-open with a newer version if desired. :)

lnicola pushed a commit to lnicola/rust that referenced this pull request Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

unexpected callee type - compiler panicked ICE with 1/8/15 nightly Struct as method ICE

6 participants