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

Don't emit "unused extern crate" warnings for extern crate foo as _; #53479

Merged
merged 1 commit into from
Aug 30, 2018

Conversation

joshtriplett
Copy link
Member

When importing a crate and renaming it to an underscore-prefixed name,
suppress "unused extern crate" warnings (but not idiom lints).

@rust-highfive
Copy link
Collaborator

r? @varkor

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 18, 2018
@joshtriplett
Copy link
Member Author

r? @eddyb

@eddyb
Copy link
Member

eddyb commented Aug 18, 2018

@bors r+

@bors
Copy link
Contributor

bors commented Aug 18, 2018

📌 Commit e2651be has been approved by eddyb

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 18, 2018
@@ -30,7 +30,7 @@ mod m {
mod unused {
use m::Tr1 as _; //~ WARN unused import
use S as _; //~ WARN unused import
extern crate core as _; //~ WARN unused extern crate
extern crate core as _; // OK
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we add a test triggering the warning?

@bors
Copy link
Contributor

bors commented Aug 22, 2018

⌛ Testing commit e2651be with merge 274ef46...

bors added a commit that referenced this pull request Aug 22, 2018
Don't emit "unused extern crate" warnings for `extern crate foo as _;`

When importing a crate and renaming it to an underscore-prefixed name,
suppress "unused extern crate" warnings (but not idiom lints).
@bors
Copy link
Contributor

bors commented Aug 22, 2018

💔 Test failed - status-travis

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-aux of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[01:41:43] 
[01:41:43] testing https://github.com/BurntSushi/xsv
[01:41:43] Initialized empty Git repository in /checkout/obj/build/ct/xsv/.git/
[01:41:43] fatal: Could not parse object '66956b6bfd62d6ac767a6b6499c982eae20a2c9f'.
[01:42:03] fatal: unable to access 'https://github.com/BurntSushi/xsv/': Could not resolve host: github.com
[01:42:03] thread 'main' panicked at 'assertion failed: status.success()', tools/cargotest/main.rs:128:13
[01:42:03] 
[01:42:03] 
[01:42:03] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/cargotest" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "/checkout/obj/build/ct"
[01:42:03] expected success, got: exit code: 101
[01:42:03] expected success, got: exit code: 101
[01:42:03] 
[01:42:03] 
[01:42:03] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/test/pretty src/test/run-pass/pretty src/test/run-fail/pretty src/test/run-pass-valgrind/pretty src/test/run-pass-fulldeps/pretty src/test/run-fail-fulldeps/pretty src/tools/cargo src/tools/cargotest
[01:42:03] Build completed unsuccessfully in 0:42:47
[01:42:03] make: *** [check-aux] Error 1
[01:42:03] Makefile:60: recipe for target 'check-aux' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:088e71e2
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:0c85e520:start=1534920666242412003,finish=1534920666250721263,duration=8309260
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:04adebda
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:078cca15
travis_time:start:078cca15
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:39f10cbe
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 22, 2018
@estebank
Copy link
Contributor

@bors retry

timeout fetching from github

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 22, 2018
@bors
Copy link
Contributor

bors commented Aug 22, 2018

☔ The latest upstream changes (presumably #53607) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 22, 2018
@TimNN
Copy link
Contributor

TimNN commented Aug 28, 2018

Ping from triage, @joshtriplett: This PR needs to be rebased.

When importing a crate and renaming it to an underscore-prefixed name,
suppress "unused extern crate" warnings (but not idiom lints).
@joshtriplett
Copy link
Member Author

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 29, 2018
@estebank
Copy link
Contributor

@bors r+
I believe @joshtriplett after rebase the PR needs to be approved again as the commit hash changes.

@bors

This comment has been minimized.

@estebank
Copy link
Contributor

@bors r=eddyb

@bors
Copy link
Contributor

bors commented Aug 29, 2018

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Contributor

bors commented Aug 29, 2018

📌 Commit 7cec516 has been approved by eddyb

@bors
Copy link
Contributor

bors commented Aug 29, 2018

⌛ Testing commit 7cec516 with merge 769769af3430b6d6947bcf09e92a3e00366c8eb1...

@bors

This comment has been minimized.

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 29, 2018
@rust-highfive

This comment has been minimized.

@joshtriplett
Copy link
Member Author

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 29, 2018
@bors
Copy link
Contributor

bors commented Aug 30, 2018

⌛ Testing commit 7cec516 with merge 6244625...

bors added a commit that referenced this pull request Aug 30, 2018
Don't emit "unused extern crate" warnings for `extern crate foo as _;`

When importing a crate and renaming it to an underscore-prefixed name,
suppress "unused extern crate" warnings (but not idiom lints).
@bors
Copy link
Contributor

bors commented Aug 30, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: eddyb
Pushing 6244625 to master...

@bors bors merged commit 7cec516 into rust-lang:master Aug 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants