-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
compiler panic "randomly" with incremental build #60629
Comments
Remember what you've done between cleaning and ICEing. (maybe auto git commit every save or similar ^^). |
when I think backward 🤔 |
https://docs.rs/slotmap/0.3.0/slotmap/macro.new_key_type.html new_key_type! {
//struct EntityKey;
/// Key for the Player slot map.
pub struct PlayerKey;
}
new_key_type! {
pub struct MyKey;
}
fn main() {
let mut players = SlotMap::with_key();
let mut entities: SlotMap<MyKey, (f64, f64)> = SlotMap::with_key();
let bob: PlayerKey = players.insert("bobby");
// Now this is a type error because entities.get expects an EntityKey:
// entities.get(bob);
} I want to know if I could use |
triage: I'm going to mark this as P-high, but it might be more of a "medium" bug. It's a bit hard to say. I think there are few bits of info that would be useful:
|
For the first question:
#[macro_use]
extern crate slotmap;
use slotmap::SlotMap;
new_key_type! {
struct EntityKey;
/// Key for the Player slot map.
pub struct PlayerKey;
}
fn main() {
let mut players = SlotMap::with_key();
let mut entities: SlotMap<EntityKey, (f64, f64)> = SlotMap::with_key();
let bob: PlayerKey = players.insert("bobby");
// Now this is a type error because entities.get expects an EntityKey:
// entities.get(bob);
}
For the second question yes it started recently when I tried this crate, but more importantly the issue persisted after I removed it, it is just much less common than every second build. |
Sadly I cannot reproduce it. Let me try to summarize it:
Am I correct? Please be as precice as possible and clarify "just rename Your nightly seems kind of outdated. Is it still possible for you if you use the latest nightly? (I tried both, no luck) |
🎉 It seems that it has been fixed on latest nightly, but I'm now able to reproduce it 100% with nightly-2019-04-05 (acd8dd6).
|
I would suggest to remove the P-High and I-nomiated tag, because it is fixed on nightly. I'll add the E-needstest tag. I just have to reduce the above example without external dependencies. Lets see what I can do. @rustbot modify labels: E-needstest |
Thanks a lot for looking into this, @hellow554! |
After a lot of effort I switched toolchain to |
@xNxExOx please do not close this issue. I created a PR which will automatically close this when it has been merged. Please reopen it |
Can confirm that the bug has been fixed in #59723 (bisecting ftw) |
…ster add regression test for rust-lang#60629 This bug was fixed, but I don't know which one. (I think it even doesn't matter at all). Added a regression test. ``` op@OP ~/m/r/s/t/incremental> rustc --version rustc 1.35.0-nightly (acd8dd6 2019-04-05) op@OP ~/m/r/s/t/incremental> rustc -C incremental= --cfg rpass1 issue-60629.rs warning: struct is never constructed: `A` --> issue-60629.rs:3:1 | 3 | struct A; | ^^^^^^^^^ | = note: #[warn(dead_code)] on by default op@OP ~/m/r/s/t/incremental> rustc -C incremental= --cfg rpass2 issue-60629.rs error: internal compiler error: src/librustc/ty/query/plumbing.rs:1195: Cannot force dep node: coherent_trait(core[c27c]::ops[0]::drop[0]::Drop[0]) thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:635:9 note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace. error: aborting due to previous error note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports note: rustc 1.35.0-nightly (acd8dd6 2019-04-05) running on x86_64-unknown-linux-gnu note: compiler flags: -C incremental ``` with latest nightly it does not crash anymore, so nothing more to do. Fixes rust-lang#60629 (accidentally removed the remote branch on github, therefore GH closed the other PR.) r? @nikomatsakis
Rollup of 6 pull requests Successful merges: - #60529 (RFC 2008: Uninhabitedness fixes for enum variants and tests) - #60620 (Fix a couple of FIXMEs in ext::tt::transcribe) - #60659 (Tweak `Symbol` and `InternedString`) - #60692 (Extend #60676 test for nested mut patterns.) - #60697 (add regression test for #60629) - #60701 (Update mailmap for mati865) Failed merges: r? @ghost
It have something to do with incremental build :(
query stack
seems to point to random function sometimes even in file that was not edited for weeks. Issue started today. Deletingtarget
folder help for few compilations.I do not use latest compiler because some problems with crate upgrades and incompatibilities with async/await! so the issue is not caused by the compiler version, because I use same version for a while, but it is triggered by something in my code.
Is there anything I can look for in my code that could cause these issues?
The text was updated successfully, but these errors were encountered: