-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Closed
Labels
A-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Description
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
Metadata
Metadata
Assignees
Labels
A-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️