You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
matthiaskrgr
changed the title
rustc can't read files with more than one dot in path
rustc can't read files with more than one dot in filename
Jul 23, 2023
Rustc has to infer the crate name when you don't specify it with --crate-name, or with #![crate_name="…"]. It is not as important for a binary compared to a library (since you can't directly import a binary), but it still appears in some circumstances like symbols, debuginfo, some diagnostics, and macros, and still needs to be well-formed.
Hmm, so it assumes {crate_name}.rs which would in this case be "a.b" which is not a valid crate name?
It would be nice to have some help message for the a.b.rs case which hints to usage of either --crate-name or #![crate_name="…"] 🙂
Why would rustc think this is related to crates when I just pass a simple path into it?
The text was updated successfully, but these errors were encountered: