Skip to content

Commit 37853a7

Browse files
authored
Merge pull request #2004 from Abhinav-ranish/fix/1870-print-display-error-comment
fix: clarify misleading 'Error' comment in print_display example
2 parents f7ad590 + 375bfda commit 37853a7

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)