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

Compiler crashed with impl Trait inside a non-existing type #53300

Closed
dovahcrow opened this issue Aug 13, 2018 · 5 comments
Closed

Compiler crashed with impl Trait inside a non-existing type #53300

dovahcrow opened this issue Aug 13, 2018 · 5 comments
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@dovahcrow
Copy link
Contributor

When putting impl Trait inside some non-existing type as the return type of a function, the compiler crashes unexpectedly with

thread 'main' panicked at 'no entry found for key', libcore/option.rs:960:5.

minimal case:

fn bug() -> Wrapper<impl A> {}

Playground: http://play.rust-lang.org/?gist=b16591d9c6cc69f894c15bfca84198d9&version=stable&mode=debug&edition=2015

rustc version (my local machine):

rustc 1.28.0 (9634041 2018-07-30)
binary: rustc
commit-hash: 9634041
commit-date: 2018-07-30
host: x86_64-apple-darwin
release: 1.28.0
LLVM version: 6.0

@dovahcrow dovahcrow changed the title Compiler crashed with impl Trait inside a non-existing type Compiler crashed with impl Trait inside a non-existing type Aug 13, 2018
@oli-obk oli-obk added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Aug 13, 2018
@oli-obk
Copy link
Contributor

oli-obk commented Aug 13, 2018

I was told that I should be more conservative with panics. Did I listen? No. "Can't happen anymore anyway", well it can

The fix is to revert the linked change (not the entire commit, just the change where the link points to)

28a76a9#diff-4ed25c00aceb84666fca639cf8101c7cL1069

and then add a test for it.

@oli-obk oli-obk added the E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. label Aug 13, 2018
@JoshBrudnak
Copy link
Contributor

@oli-obk I would like to help out with this, thanks.

@memoryruins
Copy link
Contributor

Fixed by @JoshBrudnak in #53460
Aborts without ICE on current nightly
rustc 1.30.0-nightly (d41f21f11 2018-08-24)

@TheSirC
Copy link

TheSirC commented Dec 5, 2018

Fixed by @JoshBrudnak in #53460
Aborts without ICE on current nightly
rustc 1.30.0-nightly (d41f21f11 2018-08-24)

Shouldn't this issue be closed considering this ?

@dovahcrow
Copy link
Contributor Author

I think so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

5 participants