Closed
Description
I just got an ICE while working on a testcase for another issue.
enum SomeEnum {
Something(i8),
SomethingElse([u8])
}
fn some_function(arg: &SomeEnum) -> () {
()
}
fn main() {
some_function(&SomeEnum::Something(1));
}
<anon>:3:5: 3:24 warning: variant is never used: `SomethingElse`, #[warn(dead_code)] on by default
<anon>:3 SomethingElse([u8])
^~~~~~~~~~~~~~~~~~~
<anon>:6:18: 6:21 warning: unused variable: `arg`, #[warn(unused_variables)] on by default
<anon>:6 fn some_function(arg: &SomeEnum) -> () {
^~~
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'unsized_part_of_type failed even though ty is unsized', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc_trans/trans/common.rs:168
playpen: application terminated with error code 101