Improve suggestion for extern crate self error message
This commit is contained in:
parent
62f4ce993e
commit
2ca9333011
12 changed files with 77 additions and 70 deletions
|
@ -3285,7 +3285,9 @@ impl<'a> Resolver<'a> {
|
|||
Some(binding)
|
||||
} else {
|
||||
let crate_id = if !speculative {
|
||||
self.crate_loader.process_path_extern(ident.name, ident.span)
|
||||
let Some(crate_id) =
|
||||
self.crate_loader.process_path_extern(ident.name, ident.span) else { return Some(self.dummy_binding); };
|
||||
crate_id
|
||||
} else {
|
||||
self.crate_loader.maybe_process_path_extern(ident.name)?
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue