Skip to content

Commit

Permalink
Merge pull request #2031 from galkinvv/galkinvv-display-compile-error
Browse files Browse the repository at this point in the history
Printing non-Display structs is a *compile* error
  • Loading branch information
steveklabnik committed Sep 15, 2019
2 parents c019bad + 9cb1d20 commit c10efd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ch05-02-example-structs.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ fn main() {
<span class="caption">Listing 5-11: Attempting to print a `Rectangle`
instance</span>

When we run this code, we get an error with this core message:
When we compile this code, we get an error with this core message:

```text
error[E0277]: `Rectangle` doesn't implement `std::fmt::Display`
Expand Down Expand Up @@ -195,7 +195,7 @@ Let’s try it! The `println!` macro call will now look like `println!("rect1 is
enables us to print our struct in a way that is useful for developers so we can
see its value while we’re debugging our code.

Run the code with this change. Drat! We still get an error:
Compile the code with this change. Drat! We still get an error:

```text
error[E0277]: `Rectangle` doesn't implement `std::fmt::Debug`
Expand Down

0 comments on commit c10efd2

Please sign in to comment.