Stop showing a 'cyclic import' message for unresolved imports
This only happened for single-length import paths, because the import was being looked up in its own scope.
This commit is contained in:
parent
bad05e20a3
commit
fbc0e840e3
3 changed files with 13 additions and 9 deletions
|
|
@ -1,7 +1,7 @@
|
|||
// xfail-stage0
|
||||
// error-pattern: nonexistent module
|
||||
// error-pattern: unresolved import: vec
|
||||
import vec;
|
||||
|
||||
fn main() {
|
||||
auto foo = vec.len([]);
|
||||
auto foo = vec::len([]);
|
||||
}
|
||||
|
|
@ -1,7 +1,10 @@
|
|||
// error-pattern:cyclic import
|
||||
// error-pattern: cyclic import
|
||||
|
||||
import x;
|
||||
import y::x;
|
||||
|
||||
mod y {
|
||||
import x;
|
||||
}
|
||||
|
||||
fn main() {
|
||||
auto y = x;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue