Use the glob binding in resolve_rustdoc_path process
This commit is contained in:
parent
dd6126ef56
commit
940473adb4
@ -477,6 +477,9 @@ fn import_dummy_binding(&mut self, import: Import<'a>, is_indeterminate: bool) {
|
||||
self.per_ns(|this, ns| {
|
||||
let key = BindingKey::new(target, ns);
|
||||
let _ = this.try_define(import.parent_scope.module, key, dummy_binding, false);
|
||||
this.update_resolution(import.parent_scope.module, key, false, |_, resolution| {
|
||||
resolution.single_imports.remove(&import);
|
||||
})
|
||||
});
|
||||
self.record_use(target, dummy_binding, false);
|
||||
} else if import.imported_module.get().is_none() {
|
||||
|
11
tests/ui/resolve/issue-117920.rs
Normal file
11
tests/ui/resolve/issue-117920.rs
Normal file
@ -0,0 +1,11 @@
|
||||
#![crate_type = "lib"]
|
||||
|
||||
use super::A; //~ ERROR failed to resolve
|
||||
|
||||
mod b {
|
||||
pub trait A {}
|
||||
pub trait B {}
|
||||
}
|
||||
|
||||
/// [`A`]
|
||||
pub use b::*;
|
9
tests/ui/resolve/issue-117920.stderr
Normal file
9
tests/ui/resolve/issue-117920.stderr
Normal file
@ -0,0 +1,9 @@
|
||||
error[E0433]: failed to resolve: there are too many leading `super` keywords
|
||||
--> $DIR/issue-117920.rs:3:5
|
||||
|
|
||||
LL | use super::A;
|
||||
| ^^^^^ there are too many leading `super` keywords
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0433`.
|
Loading…
Reference in New Issue
Block a user