Skip to content

Fix some ICEs and annoyances surrounding ! type #17408

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

Merged
merged 5 commits into from
Sep 22, 2014

Conversation

bkoropoff
Copy link
Contributor

  • 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 ICE: Explicit deref of non-derefable type: ! #17373
  • Don't allow explicit index of !, since later passes just ICE. There does not seem to be an issue associated with this

This prevents error spam when attempting to look up overload traits.
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
This avoids ICEs in later passes that cannot cope with this construct
@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

@alexcrichton
Copy link
Member

Thanks for looking into this! You can see some related work in the past here as well: #14574. I believe the conclusion there was that these operations would generate new inference variables instead of the bottom type (see more here as well #14973).

That being said I do like having ICEs fixed for now. @nikomatsakis do you have an opinion on waiting for #14973 being dealt with first or whether this should land in the meantime for dealing with the ICE?

@bkoropoff
Copy link
Contributor Author

Yeah, this is intended to be an interim fix until the final fate of bot is sorted out.

bors added a commit that referenced this pull request 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
@bors bors closed this Sep 22, 2014
@bors bors merged commit 6035222 into rust-lang:master Sep 22, 2014
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.

4 participants