Skip to content

Commit e9fce04

Browse files
authored
box.md: clarify that box provides needed indirection (#2283)
The last to-do for #64.
1 parent 3b349d8 commit e9fce04

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/smart-pointers/box.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ fn main() {
3131
[call methods
3232
from `T` directly on a `Box<T>`](https://doc.rust-lang.org/std/ops/trait.Deref.html#more-on-deref-coercion).
3333

34-
Recursive data types or data types with dynamic sizes need to use a `Box`:
34+
Recursive data types or data types with dynamic sizes cannot be stored inline
35+
without a pointer indirection, which can be worked around using `Box`:
3536

3637
```rust,editable
3738
#[derive(Debug)]

0 commit comments

Comments
 (0)