-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Suggest use
if import
, using
, or require
is used instead
#100140
Comments
@rustbot claim |
For the record, on nightly, both |
ah. I was not aware of this. Less work to do then! |
[Ignore this, just notes] rust/compiler/rustc_parse/src/parser/item.rs Line 274 in caee496
rust/compiler/rustc_span/src/symbol.rs Line 1172 in 6f18f0a
|
@gimbles |
Sure! The earlier message should clarify where the edits are needed to be made. Ain't nothing as a diagnostic too friendly. =) |
@chenyukang Remember to assign yourself using rustbot. 😄 Just a note for the future, usually if someone has already claimed an issue, it's not exactly common for someone else to fix it [aside from if the issue is abandoned by the claimee]. Since you're a newcomer here, I removed my assignment (and because I was working on another). However, you can find loads of easy issues with the E-Easy and/or E-Mentor tag for gaining experience. A few resources that might be helpful -> Have fun hacking on Rust! 🦀 🤎 |
@rustbot claim |
Totally forgot about |
I was looking at namely issue #99751 when I thought about this. If work is being put into improving error messages when somebody uses a keyword that defines a function in another language, there should also be improved error messages if someone uses the incorrect directive to bring something into the scope of their module or namespace/
Given the following code: Playground Link
The current output is:
The error message should preferably suggest the user to use the
use
directive to bring something into scope of their module.The text was updated successfully, but these errors were encountered: