Skip to content

[ICE] with conservative_impl_trait and universal_impl_trait #46470

Closed
@leonardo-m

Description

@leonardo-m
#![feature(conservative_impl_trait, universal_impl_trait)]
fn foo(bar: impl Iterator<Item=&str>) -> impl Iterator<Item=u8> {
    bar.map(|_| b'x')
}
fn main() {}

Gives:

note: rustc 1.24.0-nightly (f9b0897c5 2017-12-02) running on x86_64-pc-windows-gnu

thread 'rustc' panicked at 'assertion failed: match *region { ty::ReLateBound(..) => false, _ => true, }', src\librustc\infer\higher_ranked\mod.rs:471:8

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.C-bugCategory: This is a bug.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