Skip to content

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

Closed
@dovahcrow

Description

@dovahcrow

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

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions