Change:
When there is a single import statement that imports multiple idents, and one of them is not found, then the resulting error points to the use site, not the import site.
This seems to be fixed, but now the error doesn't specify which imported ident is missing, and there may be duplicates for the same missing symbol. I suppose these should be squashed.
This seems fixed to me. (If you encounter counter-evidence, please reopen, but also throw in the counter-example for us to use for regression test.)

Discussion:
match self.resolve_import_for_module(module_, import_directive) { Failed => { // We presumably emitted an error. Continue. <del> self.session.span_err(import_directive.span, ~"failed to resolve import"); </del> <ins> let idents = import_directive.module_path.get(); let msg = fmt!("failed to resolve import: %s", self.import_path_to_str(idents, *import_directive.subclass)); self.session.span_err(import_directive.span, msg); </ins> } Indeterminate => { // Bail out. We'll come around next time.

} fn idents_to_str(idents: ~[ident]) -> ~str { <del> // XXX: str::connect should do this. let mut result = ~""; let mut first = true; for idents.each() |ident| { if first { first = false; } else { result += ~"::"; } result += self.session.str_of(*ident); } // XXX: Shouldn't copy here. We need string builder functionality. return result; </del> <ins> let ident_strs = idents.map(|&ident| self.session.str_of(ident)); return str::connect(ident_strs, "::"); </ins> } <ins> fn import_directive_subclass_to_str(subclass: ImportDirectiveSubclass) -> ~str { match subclass { SingleImport(_target, source, _ns) => self.session.str_of(source), GlobImport => ~"*" } } fn import_path_to_str(idents: ~[ident], subclass: ImportDirectiveSubclass) -> ~str { if idents.is_empty() { self.import_directive_subclass_to_str(subclass) } else { fmt!("%s::%s", self.idents_to_str(idents), self.import_directive_subclass_to_str(subclass)) } } </ins> /** * Attempts to resolve the given import. The return value indicates * failure if we're certain the name does not exist, indeterminate if we

// Write the result into the def map. debug!("(resolving type) writing resolution for `%s`  (id %d)", <del> connect(path.idents.map( |x| self.session.str_of(*x)), ~"::"), </del> <ins> self.idents_to_str(path.idents), </ins> path_id); self.record_def(path_id, def); } None => { self.session.span_err (ty.span, fmt!("use of undeclared type name `%s`", <del> connect(path.idents.map( |x| self.session.str_of(*x)), ~"::"))); </del> <ins> self.idents_to_str(path.idents))); </ins> } } }

self.session.span_err( path.span, fmt!("`%s` does not name a structure", <del> connect(path.idents.map( |x| self.session.str_of(*x)), ~"::"))); </del> <ins> self.idents_to_str(path.idents))); </ins> } } }

Some(def) => { // Write the result into the def map. debug!("(resolving expr) resolved `%s`", <del> connect(path.idents.map( |x| self.session.str_of(*x)), ~"::")); </del> <ins> self.idents_to_str(path.idents)); </ins> self.record_def(expr.id, def); } None => { <del> let wrong_name = connect(path.idents.map( |x| self.session.str_of(*x)), ~"::") ; </del> <ins> let wrong_name = self.idents_to_str(path.idents); </ins> if self.name_exists_in_scope_struct(wrong_name) { self.session.span_err(expr.span, fmt!("unresolved name: `%s`. 

self.session.span_err( path.span, fmt!("`%s` does not name a structure", <del> connect(path.idents.map( |x| self.session.str_of(*x)), ~"::"))); </del> <ins> self.idents_to_str(path.idents))); </ins> } }

// hit. // <del> /// A somewhat inefficient routine to print out the name of a module. </del> <ins> /// A somewhat inefficient routine to obtain the name of a module. </ins> fn module_to_str(module_: @Module) -> ~str { let idents = DVec(); let mut current_module = module_;

if idents.len() == 0 { return ~"???"; } <del> let mut string = ~""; let mut i = idents.len() - 1; loop { if i < idents.len() - 1 { string += ~"::"; } string += self.session.str_of(idents.get_elt(i)); if i == 0 { break; } i -= 1; } return string; </del> <ins> return self.idents_to_str(vec::reversed(idents.get())); </ins> } fn dump_module(module_: @Module) {