-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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: static call to invalid vtable: VtableFnPointer #20847
Comments
Duplicate of #20676? |
After updating my local copy with #21089, this still occurs. I no longer think it is a duplicate. /cc @nikomatsakis |
Nope, not a duplicate, but a very similar oversight on my part! |
Slightly updated example #![feature(core, unboxed_closures)]
use std::ops::Fn;
fn say(x: u32, y: u32) {
println!("{} {}", x, y);
}
fn main() {
Fn::call(&say, (1, 2));
} still triggers the ICE on |
Still causing an ICE on rust nightly Playpen: http://is.gd/rZbpQe |
This still causes an ICE on nightly with the code in @jooert's comment. |
Reference rust-lang/rust#20847
This appears to be fixed: // main.rs
#![feature(fn_traits)]
use std::ops::Fn;
fn say(x: u32, y: u32) {
println!("{} {}", x, y);
}
fn main() {
Fn::call(&say, (1, 2));
} $ rustup run nightly rustc --version
rustc 1.12.0-nightly (545a3a94f 2016-08-04)
$ rustup run nightly rustc main.rs
$ ./main
1 2 |
Added a regression test in #35432 |
The text was updated successfully, but these errors were encountered: