File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
compiler/rustc_resolve/src Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -174,7 +174,17 @@ pub(crate) struct ImportData<'ra> {
174
174
175
175
pub parent_scope : ParentScope < ' ra > ,
176
176
pub module_path : Vec < Segment > ,
177
- /// The resolution of `module_path`.
177
+ /// The resolution of `module_path`:
178
+ /// - It refers to `a::b` when the `module_path` is `::a::b::c`
179
+ /// in 2018+ editions, where `a` must be an external crate.
180
+ /// - It refers to `crate::a::b` when the `module_path` is `::a::b::c`
181
+ /// in 2015 edition, where `a` can be either an external crate or
182
+ /// a module defined at crate root.
183
+ /// - It refers to `a::b` when the `module_path` is `a::b::c`, and
184
+ /// `a` refers to the module defined in the scope where the use
185
+ /// statement appears.
186
+ /// - It refers to the module or scope where the use statement is
187
+ /// defined when the `module_path` only has one segment.
178
188
pub imported_module : Cell < Option < ModuleOrUniformRoot < ' ra > > > ,
179
189
pub vis : ty:: Visibility ,
180
190
}
You can’t perform that action at this time.
0 commit comments