提交 a0c422a7 编写于 作者: M Masaki Hara

Remove a now-unnecessary paragraph.

The paragraph described a case where we can't optimize away repetitive
dynamic stack allocation. However, as arielb1 pointed out, it can
actually optimizable by dynamically delaying the stack unwinding.
上级 438edc3d
......@@ -178,22 +178,3 @@ fn main() {
```
will unnecessarily extend the stack frame.
Allocation will be improved in the future, but there are still examples that are difficult to optimize:
```rust
#![feature(unsized_locals)]
fn main() {
let mut counter = 10;
let x = loop {
let x: Box<[i32]> = Box::new([1, 2, 3, 4, 5]);
let x = *x;
if counter > 0 {
counter -= 1;
} else {
break x;
}
};
}
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册