Rollup merge of #24112 - joshtriplett:patch-1, r=steveklabnik

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.
This commit is contained in:
Manish Goregaokar 2015-04-07 18:13:12 +05:30
commit 322e4a18e3
1 changed files with 1 additions and 2 deletions

View File

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