diff --git a/src/std/box-recursive.md b/src/std/box-recursive.md index 75e616b1..157c7e3b 100644 --- a/src/std/box-recursive.md +++ b/src/std/box-recursive.md @@ -30,3 +30,12 @@ fn main() { `- - - - - - - - - - - - -' '- - - - - - - - - - - - - - - - - - - - - - - -' ``` +
+ +If the `Box` was not used here and we attempted to embed a `List` directly into the `List`, +the compiler would not compute a fixed size of the struct in memory, it would look infinite. + +`Box` solves this problem as it has the same size as a regular pointer and just points at the next +element of the `List` in the heap. + +