mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-01-22 21:53:06 +02:00
box.md: clarify that box provides needed indirection (#2283)
The last to-do for #64.
This commit is contained in:
parent
3b349d830c
commit
e9fce0417e
@ -31,7 +31,8 @@ fn main() {
|
||||
[call methods
|
||||
from `T` directly on a `Box<T>`](https://doc.rust-lang.org/std/ops/trait.Deref.html#more-on-deref-coercion).
|
||||
|
||||
Recursive data types or data types with dynamic sizes need to use a `Box`:
|
||||
Recursive data types or data types with dynamic sizes cannot be stored inline
|
||||
without a pointer indirection, which can be worked around using `Box`:
|
||||
|
||||
```rust,editable
|
||||
#[derive(Debug)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user