-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
ICE when using reference variable from iterator (instead of copying it): thread 'rustc' panicked at 'already borrowed: BorrowMutError' #66353
Comments
Seems to be an issue with use nalgebra::base::Vector3;
fn crash() {
Into::<Vector3<f32>>::into(0);
} Crash on stable, beta, nightly |
@Centril regression from stable-to-stable 🤕
|
@hellow554 A reduction would be good :) |
I'm on it. |
You want a MCVE? I give you a MCVE! 👊 pub trait Func<T> {
fn func(self);
}
pub trait A {
type AssocT;
}
impl A for () {
type AssocT = ();
}
pub fn crash() {
Func::<std::marker::PhantomData<<() as A>::AssocT>>::func(());
} @rustbot modify labels: -E-needs-mcve +E-needs-bisection |
Reduced: trait _Func<T> {
fn func(_: Self);
}
trait _A {
type AssocT;
}
fn crash() {
_Func::< <() as _A>::AssocT >::func(());
} |
regression between 1dd1884...66bf391 |
cc @estebank |
#64151 is the one to blame . |
triage: P-high. Removing nomination label. |
Do not ICE on recovery from unmet associated type bound obligation Fix rust-lang#66353. r? @Centril
Do not ICE on recovery from unmet associated type bound obligation Fix rust-lang#66353. r? @Centril
When using zipped iterators in a certain section of code, I hit an ICE.
I've attached the project source -- sorry I could not produce a minimum example though I tried. Also, it's closed source, though I own it so can choose to provide the snapshot.
Symptoms:
rustc 1.39.0 (4560ea788 2019-11-04)
, andrustc 1.40.0-nightly (1423bec54 2019-11-05)
)..get(..)
prevents the ICE from occurring.This code fails to compile:
This code compiles:
Compilation error message:
Meta
rustc --version --verbose
:1.39 (stable):
1.40 (nightly):
Backtrace:
1.39 stable
1.40 nightly
Investigation:
Steps to reproduce:
cargo build
Relevant source file:
# from project root, lines 168 onwards of crate/game_mode_selection_ui/src/system/game_mode_selection_widget_ui_system.rs
Interestingly, using
.copied()
on theposition_inits
iterator on the ICE-ing code allows it to compile:Also interestingly, using the
position_inits.get(order)
version within.map(..)
without.copied()
also causes the ICE, so it's not the zipping that's causing it, but rather something to do with theposition_init
being a reference rather than an owned value.The text was updated successfully, but these errors were encountered: