-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)C-bugCategory: This is a bug.Category: This is a bug.
Description
#![feature(const_fn)]
const fn a() -> usize { b() }
const fn b() -> usize { a() }
const ARR: [i32; a()] = [5; 6];
fn main(){}
thread 'rustc' has overflowed its stack
The same problem happens in trans when using static A: usize = a();
instead.
Since we do not have constant conditionals, there's currently no way recursion ever makes sense.
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, ...)C-bugCategory: This is a bug.Category: This is a bug.