parent
de5d5e6eeb
commit
3119afc6e8
2 changed files with 20 additions and 0 deletions
|
@ -1904,6 +1904,16 @@ class Resolver {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let i = import_resolution;
|
||||||
|
alt (i.module_target, i.value_target, i.type_target, i.impl_target) {
|
||||||
|
/*
|
||||||
|
If this name wasn't found in any of the four namespaces, it's
|
||||||
|
definitely unresolved
|
||||||
|
*/
|
||||||
|
(none, none, none, v) if v.len() == 0 { ret Failed; }
|
||||||
|
_ {}
|
||||||
|
}
|
||||||
|
|
||||||
assert import_resolution.outstanding_references >= 1u;
|
assert import_resolution.outstanding_references >= 1u;
|
||||||
import_resolution.outstanding_references -= 1u;
|
import_resolution.outstanding_references -= 1u;
|
||||||
|
|
||||||
|
|
10
src/test/compile-fail/issue-2937.rs
Normal file
10
src/test/compile-fail/issue-2937.rs
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
// error-pattern:failed to resolve imports
|
||||||
|
// n.b. Can't use a //~ ERROR because there's a non-spanned error
|
||||||
|
// message.
|
||||||
|
import x = m::f;
|
||||||
|
|
||||||
|
mod m {
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
}
|
Loading…
Reference in a new issue