Skip to content
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

Merged
merged 1 commit into from
Oct 28, 2016

Conversation

robinst
Copy link
Contributor

@robinst robinst commented Oct 27, 2016

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".

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".
@rust-highfive
Copy link
Contributor

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.

@eddyb
Copy link
Member

eddyb commented Oct 27, 2016

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Oct 27, 2016

📌 Commit de5172c has been approved by eddyb

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Oct 28, 2016
…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".
bors added a commit that referenced this pull request Oct 28, 2016
Rollup of 5 pull requests

- Successful merges: #36206, #37343, #37430, #37436, #37441
- Failed merges:
@bors bors merged commit de5172c into rust-lang:master Oct 28, 2016
@robinst robinst deleted the missing-crate-message-add-semicolon branch October 31, 2016 01:33
GuillaumeGomez pushed a commit to GuillaumeGomez/rust that referenced this pull request Nov 17, 2016
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;
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 17, 2016
…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
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 17, 2016
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants