-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ICE: expected region for ..
#125634
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone
Comments
ICEs on nightly and beta, but not on stable. Minimized further: struct Thing;
// Invariant in 'a, Covariant in 'b
struct TwoThings<'a, 'b>(*mut &'a (), &'b mut ());
impl Thing {
fn enter_scope<'a>(self, _scope: impl for<'b> FnOnce(TwoThings<'a, 'b>)) {}
}
fn foo() {
Thing.enter_scope(|ctx| {
SameLifetime(ctx);
});
}
struct SameLifetime<'a>(TwoThings<'a, 'a>); Program output
|
I'll look into it later today. |
estebank
added a commit
to estebank/rust
that referenced
this issue
Jun 24, 2024
Account for `for` lifetimes when constructing closure to see if dereferencing the return value would be valid. Fix rust-lang#125634, fix rust-lang#124563.
compiler-errors
added a commit
to compiler-errors/rust
that referenced
this issue
Jun 25, 2024
Do not ICE when suggesting dereferencing closure arg Account for `for` lifetimes when constructing closure to see if dereferencing the return value would be valid. Fix rust-lang#125634, fix rust-lang#124563.
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Jun 25, 2024
Do not ICE when suggesting dereferencing closure arg Account for `for` lifetimes when constructing closure to see if dereferencing the return value would be valid. Fix rust-lang#125634, fix rust-lang#124563.
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this issue
Jun 25, 2024
Do not ICE when suggesting dereferencing closure arg Account for `for` lifetimes when constructing closure to see if dereferencing the return value would be valid. Fix rust-lang#125634, fix rust-lang#124563.
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jun 26, 2024
Rollup merge of rust-lang#126884 - estebank:issue-125634, r=Nadrieril Do not ICE when suggesting dereferencing closure arg Account for `for` lifetimes when constructing closure to see if dereferencing the return value would be valid. Fix rust-lang#125634, fix rust-lang#124563.
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
auto-reduced (treereduce-rust):
original:
Version information
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc
Program output
The text was updated successfully, but these errors were encountered: