You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying de do a binding for a c library and i get an error when i try to pass a struct of float to a C foreign function. This is the error given by rustc :
rust: task failed at 'index out of bounds: the len is 2 but the index is 2', /rust_install/rust-0.6/src/librustc/middle/trans/cabi_x86_64.rs:248
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', /rust_install/rust-0.6/src/librustc/rustc.rc:357
rust: domain main @0x13863c0 root task failed
And this is the code who produce the error
#[link(name = "my_lib", vers = "0.1")];#[crate_type = "lib"];use core::libc::{c_void};pubextern"C"{fnrect_create() -> *rect;fnset_point(rect:*rect,pos:Vector2f) -> ();}pubstructrect{This:*c_void}pubstructVector2f{x:f32,y:f32}pubstructRectWrapped{
priv rect :*rect
}implRectWrapped{pubfnnew() -> RectWrapped{RectWrapped{rect:unsafe{rect_create()}}}}
The text was updated successfully, but these errors were encountered:
I'm trying de do a binding for a c library and i get an error when i try to pass a struct of float to a C foreign function. This is the error given by rustc :
rust: task failed at 'index out of bounds: the len is 2 but the index is 2', /rust_install/rust-0.6/src/librustc/middle/trans/cabi_x86_64.rs:248
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', /rust_install/rust-0.6/src/librustc/rustc.rc:357
rust: domain main @0x13863c0 root task failed
And this is the code who produce the error
The text was updated successfully, but these errors were encountered: