Closed jembishop closed 1 year ago
Do you mind checking if this still ICEs on the most recent nightly?
I just did that now, and it looks like the issue is fixed on the latest nightly. (sorry should have tried that in first place!)
That's weird, because I can repro it (cross-compiling for aarch64-apple-darwin
from linux if it matters).
@SNCPlay42 on the latest nightly?
@compiler-errors yep:
note: rustc 1.72.0-nightly (7820972f8 2023-06-10) running on x86_64-unknown-linux-gnu
Also the version of winit from the report (winit-0.22.2
) is not the latest and appears to fail to compile (non-ice) on stable. I'm working on bisecting and reducing now
Wait, this actually ICEs on stable too and I didn't notice because rustc emitted a bunch of errors after the ICE (?!)
I've reduced it down to this (which is no longer macOS or aarch64 dependent):
pub trait NSWindow: Sized {
unsafe fn frame(self) -> () { unimplemented!() }
unsafe fn setFrame_display_(self, windowFrame: (), display: ()) {}
}
impl NSWindow for () {}
pub struct NSRect {}
use std::ops::Deref;
struct MainThreadSafe<T = ()>(T);
impl<T> Deref for MainThreadSafe<T> {
type Target = T;
fn deref(&self) -> &T { unimplemented!() }
}
pub unsafe fn set_maximized_async(ns_window: ()) {
let ns_window = MainThreadSafe(ns_window);
move || {
unimplemented!() = {
NSWindow::frame(*ns_window);
unimplemented!()
};
ns_window.setFrame_display_(unimplemented!(), 0);
};
}
(The assignment to unimplemented!()
was of course something more reasonable in the original code, but now I can't seem to replace it without making the ICE go away)
This failed to compile without ICE on 1.69:
Regression in https://github.com/rust-lang-ci/rust/commit/7adbb6d045d413e5c2fb5e3c65728bd20d4e9828 (#108687)
searched nightlies: from nightly-2023-03-06 to nightly-2023-04-19 regressed nightly: nightly-2023-04-15 searched commit range: https://github.com/rust-lang/rust/compare/a41fc00eaf352541008965fec0dee811e44373b3...84dd17b56a931a631a23dfd5ef2018fd3ef49108 regressed commit: https://github.com/rust-lang/rust/commit/84dd17b56a931a631a23dfd5ef2018fd3ef49108
@rustbot label regression-from-stable-to-stable
Whoops, I seemed to have caused it 😆
I'll look into it!
WG-prioritization assigning priority (Zulip discussion).
@rustbot label -I-prioritize +P-medium
Code
No user code, just trying to compile my project. The
Cargo.toml
isMeta
rustc --version --verbose
:Error output