Skip to content

Commit a297651

Browse files
author
Nick Hamann
committed
Revise the E0072 explanation.
1 parent 01ab4f7 commit a297651

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/librustc_typeck/diagnostics.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -495,11 +495,9 @@ struct ListNode {
495495
This type cannot have a well-defined size, because it needs to be arbitrarily
496496
large (since we would be able to nest `ListNode`s to any depth). Specifically,
497497
498-
```
499-
size of ListNode = 1 byte for head
500-
+ 1 byte for the discriminant of the Option
501-
+ size of ListNode
502-
```
498+
size of `ListNode` = 1 byte for `head`
499+
+ 1 byte for the discriminant of the `Option`
500+
+ size of `ListNode`
503501
504502
One way to fix this is by wrapping `ListNode` in a `Box`, like so:
505503

0 commit comments

Comments
 (0)