Closed
Description
This is the minimum example I was able to get it down to:
#![feature(nll)]
extern crate itertools;
use itertools::Itertools;
fn main() {
b"abcdefg".iter().chunks(2).into_iter().map(|a| 1);
}
When try to compile this the compiler says
thread 'main' panicked at 'scrape_region_constraints: incoming region obligations = [
(
NodeId(
20
),
RegionObligation(sub_region='_#1r, sup_type=&u8)
)
]', librustc/traits/query/type_op/custom.rs:85:5
It is specifically an issue with map and non-lexical lifetimes as removing either of them doesn't cause the bug.
Meta
My current rust version is
rustc 1.30.0-nightly (63d66494a 2018-08-23)
binary: rustc
commit-hash: 63d66494aff57411bfec1dd2a3a5f1af900feab6
commit-date: 2018-08-23
host: x86_64-unknown-linux-gnu
release: 1.30.0-nightly
LLVM version: 7.0
But this happened on every other system I tried it on, including play.rust-lang.org