-
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
error: internal compiler error: compiler/rustc_passes/src/dead.rs:122:13: no type-dependent def for method #88643
Comments
reduced a bit: use std::collections::HashMap;
struct Widget {}
pub trait WidgetExt {
fn set_callback<F: FnMut(&mut Self) + 'static>(&mut self, cb: F)
where
Self: Sized;
}
static CALLBACKS: HashMap<*const dyn WidgetExt, dyn FnMut(&mut _) + 'static> = HashMap::new();
pub fn main() {}
|
@rustbot prioritize |
Further reduced: use std::collections::HashMap;
pub trait T {}
static CALLBACKS: HashMap<*const dyn T, dyn FnMut(&mut _) + 'static> = HashMap::new();
pub fn main() {} |
Panic location slightly differs: static CALLBACKS: Vec<dyn Fn(& _)> = Vec::new();
|
^ also replacing Vec with Option reveals a broken LLVM module. |
Assigning priority as discussed in the Zulip thread of the Prioritization Working Group. @rustbot label -I-prioritize +P-medium |
I just encountered a similar ICE with a slightly different source code (in the context of building a task planner). Here is the minimized code in playground: trait Task<D> {}
struct Domain;
struct Collect;
impl Task<Domain> for Collect {}
fn main() {
const POSSIBLE_TASKS: [dyn Task<_>] = [Collect];
} |
Code
I'm too new to rust to know what part of this project is causing the compiler to crash, so I made a branch for it and removed the dependency on fltk. https://github.com/battjt/cb-test/blob/rustc_bug/src/main.rs
Meta
Same failure in nightly, beta, and stable
rustc --version --verbose
:Error output
The text was updated successfully, but these errors were encountered: