Skip to content

Commit

Permalink
Ordering of items
Browse files Browse the repository at this point in the history
closes #71
  • Loading branch information
nrc committed Feb 5, 2018
1 parent 46c3636 commit d146e95
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions guide/items.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
## Items

`extern crate` statements must be first in a file. They must be ordered
alphabetically.

`use` statements, and module *declarations* (`mod foo;`, not `mod { ... }`)
must come before other items. We recommend that imports come before module
declarations; if imports and modules are separated, then they should be ordered
alphabetically.

Tools should make the above ordering optional.


### Function definitions

In Rust, one finds functions by searching for `fn [function-name]`; It's
Expand Down

0 comments on commit d146e95

Please sign in to comment.