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

[ICE] with conservative_impl_trait and universal_impl_trait #46470

Closed
leonardo-m opened this Issue Dec 3, 2017 · 4 comments

Comments

Projects
None yet
5 participants
@leonardo-m
Copy link

leonardo-m commented Dec 3, 2017

#![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
@cramertj

This comment has been minimized.

Copy link
Member

cramertj commented Dec 3, 2017

It's sort of hidden, but I'm pretty sure this is the ICE due to impl Trait return position not properly supporting lifetime elision. The elided lifetime in the argument is still present in the output iterator.

@cramertj

This comment has been minimized.

Copy link
Member

cramertj commented Dec 14, 2017

This is #46685.

bors added a commit that referenced this issue Dec 21, 2017

@kelseasy

This comment has been minimized.

Copy link

kelseasy commented Dec 21, 2017

This wasn't closed automatically.

@cramertj

This comment has been minimized.

Copy link
Member

cramertj commented Jan 5, 2018

This is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment