Closed BurntPizza closed 5 months ago
Current output:
error[E0432]: unresolved import `ordermap::Orderset`
--> src/main.rs:2:5
|
2 | use ordermap::Orderset;
| ^^^^^^^^^^--------
| | |
| | help: a similar name exists in the module (notice the capitalization): `orderset`
| no `Orderset` in the root
Everything looks good so far. But if we change the dependency to point to crates.io:
ordermap = "*"
then the error message gets weird:Note the capitalization (or lack thereof). There is no item or module called 'orderset' in
ordermap
's root. When I came across this I was importingOrdermap
and it did the same thing which was very confusing as the lowercase is also the crate name. I thought at first that coincidence was somehow responsible, but you can see the counter-example above withOrderSet
.What's even more strange is that the inline error reporting in emacs via flycheck shows it correctly! This is magical as the bug is also present in the json output, which is what flycheck consumes:
Some other cases: If the import is all lowercase, it works properly:
But if the import is all lowercase but missing the first letter, it doesn't:
Flycheck doesn't magically correct this one, but the local path import does.
Info: