Change:
<!-- Thank you for filing a bug report! Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --I tried this code: () I expected to see an error that only says that " is unresolved". But the error says that all uses of items from the module with glob import ( in this case) are unresolved too: This may lead to extremely long and unreadable errors. The issue was originally found while developing where it caused . <!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --:
<details<summaryOutput on 1.38:</summary</details label A-diagnostics A-resolve regression-from-stable-to-stable
why do you think it's a "regression-from-stable-to-stable"? IMO the output from is even worse
The error is much shorter, and only points at the actual problem. The unused import warnings, of course, wouldn't be there if those imports were actually used.
From those rollups, looks relevant.
ah, you are right, I've misread the output thinking that the warnings were errors too.
I spent some time trying to debug this last week and I'm fairly sure is the PR that introduced this. I wasn't aware of that PR at the time but I spent a lot of time trying to understand what is "determinate" vs. "indeterminate" (which is unfortunately not documented) and I remember finding out that with glob import the import is becoming "indeterminate" while it's normally (without the glob import) it is "determinate", which is one of the things we check elsewhere when generating these warnings.
Assigning as and removing .

Discussion:
let indeterminate_imports = mem::take(&mut self.indeterminate_imports); for (is_indeterminate, import) in determined_imports <del> .into_iter() </del> <ins> .iter() </ins> .map(|i| (false, i)) <del> .chain(indeterminate_imports.into_iter().map(|i| (true, i))) </del> <ins> .chain(indeterminate_imports.iter().map(|i| (true, i))) </ins> { <del> let unresolved_import_error = self.finalize_import(import); </del> <ins> let unresolved_import_error = self.finalize_import(*import); </ins> // If this import is unresolved then create a dummy import // resolution for it so that later resolve stages won't complain. <del> self.import_dummy_binding(import, is_indeterminate); </del> <ins> self.import_dummy_binding(*import, is_indeterminate); </ins> if let Some(err) = unresolved_import_error { if let ImportKind::Single { source, ref source_bindings, .. } = import.kind {

errors = vec![]; } if seen_spans.insert(err.span) { <del> errors.push((import, err)); </del> <ins> errors.push((*import, err)); </ins> prev_root_id = import.root_id; } <del> } else if is_indeterminate { let path = import_path_to_string( &import.module_path.iter().map(|seg| seg.ident).collect::<Vec<_>>(), &import.kind, import.span, ); let err = UnresolvedImportError { span: import.span, label: None, note: None, suggestion: None, candidates: None, }; // FIXME: there should be a better way of doing this than // formatting this as a string then checking for `::` if path.contains("::") { errors.push((import, err)) } </del> <ins> } } if !errors.is_empty() { self.throw_unresolved_import_error(errors); return; } for import in &indeterminate_imports { let path = import_path_to_string( &import.module_path.iter().map(|seg| seg.ident).collect::<Vec<_>>(), &import.kind, import.span, ); let err = UnresolvedImportError { span: import.span, label: None, note: None, suggestion: None, candidates: None, }; // FIXME: there should be a better way of doing this than // formatting this as a string then checking for `::` if path.contains("::") { errors.push((*import, err)) </ins> } }

<ins> pub const ITEM: Item = Item; pub struct Item; pub fn item() {} pub use doesnt_exist::*; //~^ ERROR unresolved import `doesnt_exist` mod a { use crate::{item, Item, ITEM}; } mod b { use crate::item; use crate::Item; use crate::ITEM; } mod c { use crate::item; } fn main() {} </ins>

<ins> error[E0432]: unresolved import `doesnt_exist` --> $DIR/issue-81413.rs:7:9 | LL | pub use doesnt_exist::*; |         ^^^^^^^^^^^^ maybe a missing crate `doesnt_exist`? | = help: consider adding `extern crate doesnt_exist` to use the `doesnt_exist` crate error: aborting due to previous error For more information about this error, try `rustc --explain E0432`. </ins>