This only happened for single-length import paths, because the import was being looked up in its own scope.
The error message for (for example) "import vec;" without "use std;" was "cyclic import", which was misleading because there were no cycles. I changed it to "cyclic import or nonexistent module", which doesn't break existing tests.