Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Printing non-Display structs is a *compile* error #2031

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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