Closed

Description
fn main() {
enum Foo { F1 }
let foo : *const Foo = F1 as *const Foo;
}
$ rustc foo.rs
foo.rs:4:9: 4:12 warning: unused variable: `foo`, #[warn(unused_variable)] on by default
foo.rs:4 let foo : *const Foo = F1 as *const Foo;
^~~
error: internal compiler error: translating unsupported cast: main::Foo (cast_enum) -> *const main::Foo (cast_pointer)
note: the compiler hit an unexpected failure path. 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' failed at 'Box<Any>', /var/tmp/portage/dev-lang/rust-9999-r2/work/rust-9999/src/libsyntax/diagnostic.rs:169
rust version: 1fb838d99