Skip to content

NLL ICE: unexpected region for local data ReFree #50467

@simonvandel

Description

@simonvandel

The code in https://github.com/simonvandel/fcbf/tree/nll-ice produces the following ICE:

error: internal compiler error: unexpected region for local data ReFree(DefId(0/0:13 ~ fcbf[25b8]::x[0]), BrNamed(crate0:DefIndex(1:12), 'x))
  --> src/main.rs:23:8
   |
23 |     f(&f_y);
   |        ^^^

When compiled with:

cargo +nightly check

NLL is enabled in the top of main.rs with #![feature(nll)]. Without NLL, a normal borrow check error is presented.

Meta

rustc --version --verbose:
rustc 1.27.0-nightly (91db9dc 2018-05-04)
binary: rustc
commit-hash: 91db9dc
commit-date: 2018-05-04
host: x86_64-unknown-linux-gnu
release: 1.27.0-nightly
LLVM version: 6.0

Metadata

Metadata

Labels

A-NLLArea: Non-lexical lifetimes (NLL)E-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) ❄️NLL-soundWorking towards the "invalid code does not compile" goal

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions