-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uniformative error message when missing a "self" while importing a module #31573
Comments
Even without doing an analysis of what could have likely been intended this error message could mention that paths in |
Ran into this a few days ago, would love to the messaging here improved 👍 |
The linked PR adds the information to the long diagnostics, at least. Note that if you just have an
I wonder if some consolidation would be in order. |
This is curiously missing from both the short message and this long diagnostic. Refs rust-lang#31573 (not sure if it should be considered "fixed" as the short message still only refers to extern crates).
diagnostics for E0432: imports are relative to crate root This is curiously missing from both the short message and this long diagnostic. Refs rust-lang#31573 (not sure if it should be considered "fixed" as the short message still only refers to extern crates).
diagnostics for E0432: imports are relative to crate root This is curiously missing from both the short message and this long diagnostic. Refs rust-lang#31573 (not sure if it should be considered "fixed" as the short message still only refers to extern crates).
Fixed in #36289. |
Exemple code:
Error is:
The compiler should detect that "self" is missing.
Note this is an error I do all the time as a beginner.
The text was updated successfully, but these errors were encountered: