- 
                Notifications
    
You must be signed in to change notification settings  - Fork 13.9k
 
Closed
Labels
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) ❄️P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Milestone
Description
I tried this code:
fn main() {
    let full_length = 1024;
    let range = {
        // do some stuff, omit here
        None
    };
    
    let range = range.map(|(s, t)| s..=t).unwrap_or(0..=(full_length-1));
    
    println!("{:?}", range);
}Which expected prints 0..=1023(work fine under beta channel), while, I got ICE:
error: internal compiler error: librustc/hir/map/mod.rs:329: local_def_id: no entry for `25`, which has a map of `Some(EntryTy(NodeId(71), 3, type(::std::ops::RangeInclusive)))`
Metadata
Metadata
Assignees
Labels
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) ❄️P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.