Closed
Description
From @eefriedman's comment in #27033:
fn main() {
const C: u8 = 3;
match 1 {
C @ 2 => { println!("{}", C); }
_ => {}
};
}
<anon>:4:9: 4:14 warning: unused variable: `C`, #[warn(unused_variables)] on by default
<anon>:4 C @ 2 => { println!("{}", C); }
^~~~~
Switch constants must all be same type as switch value!
switch i32 %3, label %match_else [
i8 3, label %match_case
]
LLVM ERROR: Broken function found, compilation aborted!
playpen: application terminated with error code 1
Not sure how this is happening and the code should be rejected as in #27033, but it does indicate that something in the compiler is probably broken.
cc @rust-lang/compiler