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 universal_impl_trait #46469

Closed
leonardo-m opened this Issue Dec 3, 2017 · 1 comment

Comments

Projects
None yet
3 participants
@leonardo-m
Copy link

leonardo-m commented Dec 3, 2017

Reduced code:

#![feature(universal_impl_trait, conservative_impl_trait)]
fn bar<'a, 'b>
      (data: impl Iterator<Item=&'a str> + 'b,
      x0: usize, y0: usize,
      spam: &'b [&'b [u8]]) -> impl Iterator<Item=u8> + 'b
where 'a: 'b {
    data.map(move |baz| {
        let (x2, y2) = baz.bytes().fold((x0, y0), |(x, y), c| (x, y));
        spam[y2][x2]
    })
}
fn main() {}

Gives:

error: internal compiler error: src\librustc\ty\subst.rs:424: Region parameter out of range when substituting in region 'b (root type=None) (index=2)

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

thread 'rustc' panicked at 'Box<Any>', src\librustc_errors\lib.rs:448:8
@cramertj

This comment has been minimized.

Copy link
Member

cramertj commented Jan 5, 2018

This works on nightly.

@leonardo-m leonardo-m closed this Jan 18, 2018

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