Skip to content

Commit

Permalink
Rollup merge of rust-lang#24112 - joshtriplett:patch-1, r=steveklabnik
Browse files Browse the repository at this point in the history
 traits.md said:

If we add a `use` line right above `main` and make the right things public,
everything is fine:

However, the use line was actually placed at the top of the file instead.  Move
the use line to right above main.  That also makes the example more evocative
of cases where the module is defined in a separate file.
  • Loading branch information
Manishearth committed Apr 7, 2015
2 parents 6efb835 + 59d8898 commit 322e4a1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/doc/trpl/traits.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,6 @@ everything is fine:

```{rust}
# #![feature(core)]
use shapes::HasArea;
mod shapes {
use std::f64::consts;
Expand All @@ -251,6 +249,7 @@ mod shapes {
}
}
use shapes::HasArea;
fn main() {
let c = shapes::Circle {
Expand Down

0 comments on commit 322e4a1

Please sign in to comment.