-
Notifications
You must be signed in to change notification settings - Fork 13.3k
"mod lib" in lib.rs produces incorrect error message #36146
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I think what happens in the first case is:
The fix should be to disallow a module named As an aside, there are way too many weasel words in those notes! |
cc #34157 |
Since the "directory ownership" requirement was removed, the new error message is:
(This bug remains relevant because the error message comes from the second time |
Indeed, adding
#![feature(non_modrs_mods)]
mod a1;
mod lib;
|
lib.rs:
a1.rs - empty file.
Error:
Error location and some of the messages incorrectly refer to a1 module instead of lib. Module a1 itself is declared correctly. If I write lib before a1, the error starts making more sense:
lib.rs:
Error:
The text was updated successfully, but these errors were encountered: