@@ -21,12 +21,12 @@ Here's a brief summary:
2121
2222* ` extern crate ` is no longer needed
2323* The ` crate ` keyword refers to the current crate.
24- * Relative paths variant: Paths work uniformly in both ` use ` statements and in
25- other code, both in the top-level module and in submodules, and may use
24+ * Relative paths variant: Paths work uniformly in both ` use ` declarations and
25+ in other code, both in the top-level module and in submodules, and may use
2626 either absolute paths or local names relative to the current module.
27- * Absolute use paths variant: Paths in ` use ` statements are always absolute and
28- begin with a crate name (or ` crate ` ); paths in other code may use absolute
29- paths or local names relative to the current module.
27+ * Absolute use paths variant: Paths in ` use ` declarations are always absolute
28+ and begin with a crate name (or ` crate ` ); paths in other code may use
29+ absolute paths or local names relative to the current module.
3030* The ` crate ` keyword also acts as a visibility modifier, equivalent to today's ` pub(crate) ` .
3131* A ` foo.rs ` and ` foo/ ` subdirectory may coexist; ` mod.rs ` is no longer needed
3232 when placing submodules in a subdirectory.
@@ -73,10 +73,10 @@ Check [the macro section](2018/transitioning/modules/macros.html) for more.
7373
7474### The ` crate ` keyword refers to the current crate.
7575
76- In ` use ` statements and in other code, you can refer to the root of the current
77- crate with the ` crate:: ` prefix. For instance, ` crate::foo::bar ` will always
78- refer to the name ` bar ` inside the module ` foo ` , from anywhere else in the same
79- crate.
76+ In ` use ` declarations and in other code, you can refer to the root of the
77+ current crate with the ` crate:: ` prefix. For instance, ` crate::foo::bar ` will
78+ always refer to the name ` bar ` inside the module ` foo ` , from anywhere else in
79+ the same crate.
8080
8181The prefix ` :: ` previously referred to either the crate root or an external
8282crate; it now unambiguously refers to an external crate. For instance,
@@ -85,14 +85,14 @@ crate; it now unambiguously refers to an external crate. For instance,
8585### Relative paths variant
8686
8787The relative paths variant of Rust 2018 simplifies and unifies path handling
88- compared to Rust 2015. In Rust 2015, paths work differently in use statements
89- than they do elsewhere. In particular, paths in ` use ` statements would always
90- start from the crate root, while paths in other code implicitly started from
91- the current module. Those differences didn't have any effect in the top-level
92- module, which meant that everything would seem straightforward until working on
93- a project large enough to have submodules.
94-
95- In the relative paths variant of Rust 2018, paths in ` use ` statements and in
88+ compared to Rust 2015. In Rust 2015, paths work differently in ` use `
89+ declarations than they do elsewhere. In particular, paths in ` use `
90+ declarations would always start from the crate root, while paths in other code
91+ implicitly started from the current module. Those differences didn't have any
92+ effect in the top-level module, which meant that everything would seem
93+ straightforward until working on a project large enough to have submodules.
94+
95+ In the relative paths variant of Rust 2018, paths in ` use ` declarations and in
9696other code always work the same way, both in the top-level module and in any
9797submodule. You can either use a relative path from the current module, an
9898absolute path from the top of the current crate (starting with ` crate:: ` ), or
@@ -205,7 +205,7 @@ To explicitly disambiguate a path, use `::name` for an external crate name, or
205205
206206### Absolute use paths variant
207207
208- In the absolute use paths variant of Rust 2018, paths in ` use ` statements
208+ In the absolute use paths variant of Rust 2018, paths in ` use ` declarations
209209* must* begin with one of:
210210
211211- A crate name
@@ -245,9 +245,9 @@ mod foo {
245245use crate::foo::Bar;
246246```
247247
248- In addition, all of these path forms are available outside of ` use ` statements
249- as well, which eliminates many sources of confusion. Consider this code in Rust
250- 2015:
248+ In addition, all of these path forms are available outside of ` use `
249+ declarations as well, which eliminates many sources of confusion. Consider this
250+ code in Rust 2015:
251251
252252``` rust,ignore
253253// Rust 2015
0 commit comments