-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nightly compiler panics when attempting to mutate a shared reference. #91206
Comments
Bisected to #90352. CC @camsteffen @oli-obk searched nightlies: from nightly-2021-10-01 to nightly-2021-11-25 bisected with cargo-bisect-rustc v0.6.1Host triple: aarch64-apple-darwin cargo bisect-rustc 2021-10-01 --regress ice @rustbot label regression-from-stable-to-nightly |
I can fix this quickly -- seems like just changing an @rustbot claim |
(only tangentially related) I also noticed a regression in error spans between stable and beta... stable:
beta:
|
@compiler-errors That was an intentional change, meant to highlight the fact that the attempted mutable borrow is occurring because of the method call. However, it seems to be confusing for a lot of people, so I'll look into improving it. |
@Aaron1011 Ah thanks for letting me know. Maybe we can split the span up into the receiver and the method, and add a note on the latter like "due to this method which takes &mut self". Not sure if that much info bubbles down into borrowck. I'd be interested in making that change if you've got a lot on your plate and it's (relatively) easy to do. |
Fix ICE due to out-of-bounds statement index when reporting borrowck error Replace an `[index]` with a `.get` when `statement_index` points to a basic-block terminator (and is therefore out-of-bounds in the statements list). Fixes rust-lang#91206 Cc `@camsteffen` r? `@oli-obk`
Fix ICE due to out-of-bounds statement index when reporting borrowck error Replace an `[index]` with a `.get` when `statement_index` points to a basic-block terminator (and is therefore out-of-bounds in the statements list). Fixes rust-lang#91206 Cc ``@camsteffen`` r? ``@oli-obk``
See #90286 for discussion about this exact idea. It'd be nice, but likely hard to implement. |
Fix ICE due to out-of-bounds statement index when reporting borrowck error Replace an `[index]` with a `.get` when `statement_index` points to a basic-block terminator (and is therefore out-of-bounds in the statements list). Fixes rust-lang#91206 Cc ```@camsteffen``` r? ```@oli-obk```
Assigning priority as discussed in the Zulip thread of the Prioritization Working Group. @rustbot label -I-prioritize +P-high |
Fix ICE due to out-of-bounds statement index when reporting borrowck error Replace an `[index]` with a `.get` when `statement_index` points to a basic-block terminator (and is therefore out-of-bounds in the statements list). Fixes rust-lang#91206 Cc `@camsteffen` r? `@oli-obk`
Code
Meta
rustc --version --verbose
:In case it helps, when using the stable toolchain, the compiler does not panic but instead emits this error:
Stable version used in above output:
Error output
Backtrace
The text was updated successfully, but these errors were encountered: