Skip to content

'rustc' panicked at 'Box<Any>' #18884

Closed
Closed
@abhijeetbhagat

Description

@abhijeetbhagat

I think this could be already under consideration, but anyway.
I am doing FFI with libsqlite3 and want to convert an array of C strings to an array of &str:

extern fn callback(vp : *mut c_void, argc: c_int, argv : *mut*mut c_char, azColName : *mut*mut c_char){
    unsafe{
        let ar = argv as *mut[&str];
    }
}
error: internal compiler error: translating unsupported cast: *mut *mut i8 (cast_pointer) -> *mut [&str] (cast_other)
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' panicked at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libsyntax/diagnostic.rs:175

$ rustc --version=verbose
rustc 0.13.0-nightly
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu (Ubuntu 12.04.5)
release: 0.13.0-nightly

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-DSTsArea: Dynamically-sized types (DSTs)I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions