【发布时间】:2014-12-25 13:25:14
【问题描述】:
我希望向 Rust 专家验证这个简单的 Rust 程序(rustc 0.13.0-nightly 在 Linux x86-64 系统上):
/*
the runtime error is:
task '<main>' has overflowed its stack
Illegal instruction (core dumped)
*/
fn main() {
let l = [0u, ..1_000_000u];
}
编译过程完美结束,没有错误,但在运行时程序失败并出现代码注释中显示的错误。
Rust 中固定大小数组的维度是否有限制,或者这是编译器中的某个错误?
【问题讨论】:
标签: arrays stack-overflow rust