Skip to content

ICE: region_obligations not empty #46069

Closed
@bluss

Description

@bluss

New ICE discovered (in itertools' test suite):

thread 'rustc' panicked at 'region_obligations not empty: [
    (
        NodeId(
            0
        ),  
        RegionObligation(sub_region='_#60r, sup_type=u8)
    )   
]', /checkout/src/librustc/infer/mod.rs:1160:8

(Note, the issue has been worked around in itertools, to keep CI green)

Code to reproduce

(playground link)

//! ```cargo
//! [dependencies]
//! itertools = "=0.7.2"
//! ```
extern crate itertools;

use itertools::Itertools;

fn equal_combinations_2(a: Vec<u8>) {
    a.iter().cloned().tuple_combinations::<(_, _)>();
}

Implementation links for tuple_combinations:

  1. https://github.com/bluss/rust-itertools/blob/c56a69d7cc3014b04bb88bbe42040a0243168a0a/src/lib.rs#L992-L998
  2. https://github.com/bluss/rust-itertools/blob/c56a69d7cc3014b04bb88bbe42040a0243168a0a/src/adaptors/mod.rs#L910-L921

Full error

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.23.0-nightly (d0f8e2913 2017-11-16) running on x86_64-unknown-linux-gnu

thread 'rustc' panicked at 'region_obligations not empty: [
    (
        NodeId(
            0
        ),  
        RegionObligation(sub_region='_#60r, sup_type=u8)
    )   
]', /checkout/src/librustc/infer/mod.rs:1160:8

Metadata

Metadata

Assignees

Labels

C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions