Closed
Description
Issue by mahkoh
Monday Oct 27, 2014 at 13:24 GMT
For earlier discussion, see rust-lang/rust#18363
This issue was labelled with: I-enhancement, I-slow in the Rust repository
extern crate test;
pub struct X {
x: [u8, ..1 << 10],
}
pub fn f() -> X {
let mut x: X = unsafe { std::mem::uninitialized() };
for i in range(0, x.x.len()) {
x.x[i] = i as u8;
}
x
}
fn main() {
let x = f();
test::black_box(&x);
}
This function needs 2k stack space even though f is being inlined.
Metadata
Metadata
Assignees
Labels
No labels