Skip to content

Use of unimplemented!() causing ICE with NLL #51345

Closed
@dylanede

Description

@dylanede

Here is a fairly small test case (playground):

#![feature(nll)]
fn main() {
    use std::collections::HashMap;
    let mut m: HashMap<(), ()> = HashMap::new();
    m.insert((), unimplemented!());
}

The error message is

thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `Some((_4, bw0))`,
 right: `None`: never found an activation for this borrow!', librustc_mir/borrow_check/borrow_set.rs:121:9

Metadata

Metadata

Assignees

Labels

A-NLLArea: Non-lexical lifetimes (NLL)A-diagnosticsArea: Messages for errors, warnings, and lintsE-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions