-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Add semicolon to "Maybe a missing extern crate foo
" message
#37430
Add semicolon to "Maybe a missing extern crate foo
" message
#37430
Conversation
I had it a couple of times that I was missing the "extern crate" line after I introduced a new dependency. So I copied the text from the message and inserted it into the beginning of my code, only to find the compiler complaining that I was missing the semicolon. (I forgot to add it after the text that I had pasted.) There's a similar message which does include the semicolon, namely "help: you can import it into scope: `use foo::Bar;`". I think the two messages should be consistent, so this change adds it for "extern crate".
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @eddyb (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
@bors r+ rollup |
📌 Commit de5172c has been approved by |
…emicolon, r=eddyb Add semicolon to "Maybe a missing `extern crate foo`" message I had it a couple of times that I was missing the "extern crate" line after I introduced a new dependency. So I copied the text from the message and inserted it into the beginning of my code, only to find the compiler complaining that I was missing the semicolon. (I forgot to add it after the text that I had pasted.) There's a similar message which does include the semicolon, namely "help: you can import it into scope: `use foo::Bar;`". I think the two messages should be consistent, so this change adds it for "extern crate".
Similar to pull request rust-lang#37430, this makes the message more copy-paste friendly and aligns it with other messages like: help: you can import it into scope: use foo::Bar;
…olon, r=eddyb Add semicolon to "perhaps add a `use` for one of them" help Similar to pull request rust-lang#37430, this makes the message more copy-paste friendly and aligns it with other messages like: help: you can import it into scope: use foo::Bar; r? @eddyb
…olon, r=eddyb Add semicolon to "perhaps add a `use` for one of them" help Similar to pull request rust-lang#37430, this makes the message more copy-paste friendly and aligns it with other messages like: help: you can import it into scope: use foo::Bar; r? @eddyb
I had it a couple of times that I was missing the "extern crate" line
after I introduced a new dependency. So I copied the text from the
message and inserted it into the beginning of my code, only to find the
compiler complaining that I was missing the semicolon. (I forgot to add
it after the text that I had pasted.)
There's a similar message which does include the semicolon, namely
"help: you can import it into scope:
use foo::Bar;
". I think the twomessages should be consistent, so this change adds it for "extern
crate".