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
#[repr(C)]
#[allow(dead_code)]
struct Slice<T> {
data: *const T,
len: usize,
}
fn main() {
let text = "Hello World!\n";
let t1 = text as *const str;
let t2 = t1 as *const Slice<u8>;
}
error: internal compiler error: translating unsupported cast: *const str (cast_other) -> *const Slice<u8> (cast_pointer)
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
thread 'rustc' panicked at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:189
The text was updated successfully, but these errors were encountered:
kmcallister
added
the
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
label
Feb 20, 2015
Code to reproduce.
Rust Playpen: http://is.gd/jfBLrG
Output
The text was updated successfully, but these errors were encountered: