-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Description
STR
#![feature(const_fn)]
const fn four() -> u32 { 4 }
const FOUR: u32 = four();
fn main() { match 4 { FOUR => {}, _ => unreachable!() }}
at the current version of play.rust-lang.org
ICE
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 'internal error: entered unreachable code', ../src/librustc/middle/const_eval.rs:327
playpen: application terminated with error code 101
Metadata
Metadata
Assignees
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️