Closed
Description
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
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
[-]Compiler crashed with impl Trait inside a non-existing type[/-][+]Compiler crashed with `impl Trait` inside a non-existing type[/+]oli-obk commentedon 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.
JoshBrudnak commentedon Aug 13, 2018
@oli-obk I would like to help out with this, thanks.
memoryruins commentedon Aug 25, 2018
Fixed by @JoshBrudnak in #53460
Aborts without ICE on current nightly
rustc 1.30.0-nightly (d41f21f11 2018-08-24)
TheSirC commentedon Dec 5, 2018
Shouldn't this issue be closed considering this ?
dovahcrow commentedon Dec 5, 2018
I think so.