diff options
| -rw-r--r-- | src/librustc_typeck/diagnostics.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index 10bae6f63d0..c84a42dfe8e 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -495,11 +495,9 @@ struct ListNode { This type cannot have a well-defined size, because it needs to be arbitrarily large (since we would be able to nest `ListNode`s to any depth). Specifically, -``` -size of ListNode = 1 byte for head - + 1 byte for the discriminant of the Option - + size of ListNode -``` + size of `ListNode` = 1 byte for `head` + + 1 byte for the discriminant of the `Option` + + size of `ListNode` One way to fix this is by wrapping `ListNode` in a `Box`, like so: |
