-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
I think add a little explanation of this #[allow(dead_code)] could be better. One line is enough.
rust-by-example/src/hello/print.md
Lines 62 to 68 in 8888f94
| #[allow(dead_code)] | |
| struct Structure(i32); | |
| // This will not compile because `Structure` does not implement | |
| // fmt::Display. | |
| //println!("This struct `{}` won't print...", Structure(3)); | |
| // TODO ^ Try uncommenting this line |
Firstly, I'm a little bit confused by it, and then I googled. The first link redirected me to dead_code - Rust By Example.
Since it would be covered later in RBE, why don't mention it and give a reference link? Just like giving out a link of macro in Hello World - Rust By Example.
This could make life much easier for beginners.
Metadata
Metadata
Assignees
Labels
No labels