File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ mod continue_keyword { }
119
119
/// The `as` keyword can be used to change what the crate is referred to as in your project. If a
120
120
/// crate name includes a dash, it is implicitly imported with the dashes replaced by underscores.
121
121
///
122
- /// `crate` is also used as in conjunction with `pub` to signify that the item it's attached to
122
+ /// `crate` can also be used as in conjunction with `pub` to signify that the item it's attached to
123
123
/// is public only to other members of the same crate it's in.
124
124
///
125
125
/// ```rust
@@ -131,6 +131,10 @@ mod continue_keyword { }
131
131
/// }
132
132
/// ```
133
133
///
134
+ /// `crate` is also used to represent the absolute path of a module, where `crate` refers to the
135
+ /// root of the current crate. For instance, `crate::foo::bar` refers to the name `bar` inside the
136
+ /// module `foo`, from anywhere else in the same crate.
137
+ ///
134
138
/// [Reference]: ../reference/items/extern-crates.html
135
139
mod crate_keyword { }
136
140
You can’t perform that action at this time.
0 commit comments