Skip to content
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

ICE: Explicit deref of non-derefable type: ! #17373

Closed
mahkoh opened this issue Sep 18, 2014 · 3 comments
Closed

ICE: Explicit deref of non-derefable type: ! #17373

mahkoh opened this issue Sep 18, 2014 · 3 comments
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@mahkoh
Copy link
Contributor

mahkoh commented Sep 18, 2014

fn main() {
    *(fail!()) = fail!();
}
test.rs:2:5: 2:15 error: internal compiler error: Explicit deref of non-derefable type: !
test.rs:2     *(fail!()) = fail!();
              ^~~~~~~~~~
@bkoropoff
Copy link
Contributor

Taking a look.

@bkoropoff
Copy link
Contributor

Probably the best fix for now is to disallow deref of ! outright. I'll work up a PR that fixes this and a few other ICEs surrounding !.

bkoropoff added a commit to bkoropoff/rust that referenced this issue Sep 20, 2014
Later compiler passes are not prepared to deal with deref of
`ty_bot` and will generate various ICEs, so disallow it outright for now.

Closes issue rust-lang#17373
bkoropoff added a commit to bkoropoff/rust that referenced this issue Sep 20, 2014
@steveklabnik steveklabnik added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Sep 22, 2014
bors added a commit that referenced this issue Sep 22, 2014
- Don't attempt to autoderef `!`.  The `Deref`/`DerefMut` trait lookup would generate a bunch of unhelpful error spew.
- Don't allow explicit deref of `!`, since later passes just ICE.  This closes issue #17373 
- Don't allow explicit index of `!`, since later passes just ICE.  There does not seem to be an issue associated with this
@ghost ghost added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Oct 4, 2014
@ghost
Copy link

ghost commented Oct 5, 2014

This is fixed with a test, closing.

@ghost ghost closed this as completed Oct 5, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

3 participants