Improve an error message in resolve
This commit is contained in:
parent
b34a97de39
commit
d1819fb747
@ -903,9 +903,16 @@ fn l_i_m_r(&env e, &def m, &span sp, &ident id,
|
||||
ret some[def](matches.(0));
|
||||
} else {
|
||||
for (def match in matches) {
|
||||
e.sess.span_note(e.ast_map.get
|
||||
(ast::def_id_of_def(match)).span,
|
||||
"'" + id + "' is defined here.");
|
||||
alt (e.ast_map.find(ast::def_id_of_def(match))) {
|
||||
case (some(?it)) {
|
||||
e.sess.span_note(it.span,
|
||||
"'" + id + "' is defined here.");
|
||||
}
|
||||
case (_) {
|
||||
e.sess.bug("Internal error: imports and matches "
|
||||
+ "don't agree");
|
||||
}
|
||||
}
|
||||
}
|
||||
e.sess.span_err(sp, "'" + id + "' is glob-imported from" +
|
||||
" multiple different modules.");
|
||||
|
Loading…
Reference in New Issue
Block a user