Skip to content

Commit 375bfda

Browse files
fix: clarify misleading 'Error' comment in print_display example (#1870)
1 parent 8819d3e commit 375bfda

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/hello/print/print_display.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,9 @@ fn main() {
9494
println!("Display: {}", point);
9595
println!("Debug: {:?}", point);
9696
97-
// Error. Both `Debug` and `Display` were implemented, but `{:b}`
98-
// requires `fmt::Binary` to be implemented. This will not work.
97+
// The following line would not compile: both `Debug` and `Display`
98+
// were implemented, but `{:b}` requires `fmt::Binary` to be
99+
// implemented, which it hasn't been for `Point2D`.
99100
// println!("What does Point2D look like in binary: {:b}?", point);
100101
}
101102
```

0 commit comments

Comments
 (0)