Closed
Description
Sometimes it is very useful when rustc figures out that the faulty module use you just made is probably just a typo and directs you a potential match (thanks for that!). However it also directs you to potential matches which haven't been found either in certain cases, for example compiling
use DoesntExist1;
use DoesntExist2;
currently (2016-11-28) yields with both stable and nightly the following output:
error[E0432]: unresolved import `DoesntExist1`
--> src/lib.rs:1:5
|
1 | use DoesntExist1;
| ^^^^^^^^^^^^ no `DoesntExist1` in the root
error[E0432]: unresolved import `DoesntExist2`
--> src/lib.rs:2:5
|
2 | use DoesntExist2;
| ^^^^^^^^^^^^ no `DoesntExist2` in the root. Did you mean to use `DoesntExist1`?
While this is merely a suggestion displayed and shouldn't cause any harm at all maybe it might still be worth to check if what is suggested was actually found in the current scope. Or would that be too expensive (e.g. overhead in tracking what was already successfully imported and what not) and is thus left as is by design?