about summary refs log tree commit diff
path: root/compiler/rustc_resolve
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-06-29 07:22:39 +0000
committerbors <bors@rust-lang.org>2025-06-29 07:22:39 +0000
commit5ca574e85b67cec0a6fc3fddfe398cbe676c9c69 (patch)
treec7d3e5ee81cf83ba8226119a5097b80f093d2cdd /compiler/rustc_resolve
parentdddd7ab96229ea5f2ca96afcb5984a9831393a13 (diff)
parenta262c001f6fd131e2eca2d45627fa5bb7754fd6c (diff)
downloadrust-5ca574e85b67cec0a6fc3fddfe398cbe676c9c69.tar.gz
rust-5ca574e85b67cec0a6fc3fddfe398cbe676c9c69.zip
Auto merge of #143173 - matthiaskrgr:rollup-ieu5k05, r=matthiaskrgr
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#142021 (Doc: clarify priority of lint level sources)
 - rust-lang/rust#142367 (Add regression test for rust-lang/rust#137857 to ensure that we generate intra doc links for extern crate items.)
 - rust-lang/rust#142641 (Generate symbols.o for proc-macros too)
 - rust-lang/rust#142889 (Clarify doc comment on unix OpenOptions)
 - rust-lang/rust#143063 (explain `ImportData::imported_module`)
 - rust-lang/rust#143088 (Improve documentation of `TagEncoding`)
 - rust-lang/rust#143135 (fix typos on some doc comments)
 - rust-lang/rust#143138 (Port `#[link_name]` to the new attribute parsing infrastructure)
 - rust-lang/rust#143155 (`librustdoc` house-keeping 🧹)
 - rust-lang/rust#143169 (Remove unused feature gates)
 - rust-lang/rust#143171 (Fix the span of trait bound modifier `[const]`)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_resolve')
-rw-r--r--compiler/rustc_resolve/src/imports.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/imports.rs b/compiler/rustc_resolve/src/imports.rs
index 1b7a2c3bda0..2e81b54b136 100644
--- a/compiler/rustc_resolve/src/imports.rs
+++ b/compiler/rustc_resolve/src/imports.rs
@@ -174,7 +174,14 @@ pub(crate) struct ImportData<'ra> {
 
     pub parent_scope: ParentScope<'ra>,
     pub module_path: Vec<Segment>,
-    /// The resolution of `module_path`.
+    /// The resolution of `module_path`:
+    ///
+    /// | `module_path` | `imported_module` | remark |
+    /// |-|-|-|
+    /// |`use prefix::foo`| `ModuleOrUniformRoot::Module(prefix)`               | - |
+    /// |`use ::foo`      | `ModuleOrUniformRoot::ExternPrelude`                | 2018+ editions |
+    /// |`use ::foo`      | `ModuleOrUniformRoot::CrateRootAndExternPrelude`    | a special case in 2015 edition |
+    /// |`use foo`        | `ModuleOrUniformRoot::CurrentScope`                 | - |
     pub imported_module: Cell<Option<ModuleOrUniformRoot<'ra>>>,
     pub vis: ty::Visibility,
 }