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

crates that provide a panic_handler are exempt from the unused_extern_crates lint #54007

Merged
merged 2 commits into from
Sep 8, 2018

Conversation

japaric
Copy link
Member

@japaric japaric commented Sep 6, 2018

fixes the first false positive reported in #53964

…crates`

fixes the *first* false positive reported in rust-lang#53964
@rust-highfive
Copy link
Collaborator

r? @cramertj

(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 Sep 6, 2018
@cramertj
Copy link
Member

cramertj commented Sep 6, 2018

Seems reasonable to me!

@bors r+

@bors
Copy link
Contributor

bors commented Sep 6, 2018

📌 Commit 9b764c3 has been approved by cramertj

@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 Sep 6, 2018
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-5.0 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.
[00:47:13] ....................................................................................................
[00:47:16] ....................i...............................................................................
[00:47:19] ....................................................................................................
[00:47:22] ....................................................................................................
[00:47:25] ..................................................................F.................................
[00:47:31] ....................................................................................................
[00:47:34] ....................................................................................................
[00:47:38] .......................................................................................i............
[00:47:41] ....................................................................................................
---
[00:47:50] 
[00:47:50] ---- [ui] ui/removing-extern-crate.rs stdout ----
[00:47:50] diff of stderr:
[00:47:50] 
[00:47:50] - warning: unused extern crate
[00:47:50] + warning: `extern crate` is not idiomatic in the new edition
[00:47:50] 3    |
[00:47:50] 3    |
[00:47:50] 4 LL | extern crate std as foo;
[00:47:50] 
[00:47:50] -    | ^^^^^^^^^^^ckout/src/test/ui/removing-extern-crate.rs:16:9\n   |\nLL | #![warn(rust_2018_idioms)]\n   |         ^^^^^^^^^^^^^^^^\n   = note: #[warn(unused_extern_crates)] implied by #[warn(rust_2018_idioms)]\n\n"}
[00:47:50] {"message":"unused extern crate","code":{"code":"unused_extern_crates","explanation":null},"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/removing-extern-crate.rs","byte_start":632,"byte_end":650,"line_start":20,"line_end":20,"column_start":1,"column_end":19,"is_primary":true,"text":[{"text":"extern crate core;","highlight_start":1,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove it","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/removing-extern-crate.rs","byte_start":632,"byte_end":650,"line_start":20,"line_end":20,"column_start":1,"column_end":19,"is_primary":true,"text":[{"text":"extern crate core;","highlight_start":1,"highlight_end":19}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"warning: unused extern crate\n  --> /checkout/src/test/ui/removing-extern-crate.rs:20:1\n   |\nLL | extern crate core;\n   | ^^^^^^^^^^^^^^^^^^ help: remove it\n\n"}
[00:47:50] {"message":"`extern crate` is not idiomatic in the new edition","code":{"code":"unused_extern_crates","explanation":null},"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/removing-extern-crate.rs","byte_start":670,"byte_end":694,"line_start":23,"line_end":23,"column_start":5,"column_end":29,"is_primary":tru":5,"column_end":22,"is_primary":true,"text":[{"text":"    extern crate std;","highlight_start":5,"highlight_end":22}],"label":null,"suggested_replacement":"use std;","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"warning: `extern crate` is not idiomatic in the new edition\n  --> /checkout/src/test/ui/removing-extern-crate.rs:24:5\n   |\nLL |     extern crate std;\n   |     ^^^^^^^^^^^^^^^^^ help: convert it to a `use`\n\n"}
[00:47:50] ------------------------------------------
[00:47:50] 
[00:47:50] thread '[ui] ui/removing-extern-crate.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:47:50] note: Run with `RUST_BACKTRACE=1` for a backtrace.
---
[00:47:50] 
[00:47:50] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:497:22
[00:47:50] 
[00:47:50] 
[00:47:50] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linThu, 06 Sep 2018 20:17:12 GMT

The command "date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
" exited with 0.
travis_fold:start:after_failure.1

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)

@japaric
Copy link
Member Author

japaric commented Sep 6, 2018

bors r=cramertj

@japaric
Copy link
Member Author

japaric commented Sep 6, 2018

@bors r=cramertj

@bors
Copy link
Contributor

bors commented Sep 6, 2018

📌 Commit 6c4f3f5 has been approved by cramertj

kennytm added a commit to kennytm/rust that referenced this pull request Sep 8, 2018
crates that provide a `panic_handler` are exempt from the `unused_extern_crates` lint

fixes the *first* false positive reported in rust-lang#53964
bors added a commit that referenced this pull request Sep 8, 2018
Rollup of 11 pull requests

Successful merges:

 - #51366 (stabilize #[panic_handler])
 - #53162 (rustdoc: collect trait impls as an early pass)
 - #53932 ([NLL] Remove base_place)
 - #53942 (Rewrite `precompute_borrows_out_of_scope` for fewer hash table lookups.)
 - #53973 (Have rust-lldb look for the rust-enabled lldb)
 - #53981 (Implement initializer() for FileDesc)
 - #53987 (rustbuild: allow configuring llvm version suffix)
 - #53993 (rustc_resolve: don't record uniform_paths canaries as reexports.)
 - #54007 (crates that provide a `panic_handler` are exempt from the `unused_extern_crates` lint)
 - #54040 (update books for next release)
 - #54050 (Update `petgraph` dependency to 0.4.13 to fix build with nightly)

Failed merges:

r? @ghost
kennytm added a commit to kennytm/rust that referenced this pull request Sep 8, 2018
crates that provide a `panic_handler` are exempt from the `unused_extern_crates` lint

fixes the *first* false positive reported in rust-lang#53964
bors added a commit that referenced this pull request Sep 8, 2018
Rollup of 10 pull requests

Successful merges:

 - #53315 (use `NonZeroU32` in `newtype_index!`macro, change syntax)
 - #53932 ([NLL] Remove base_place)
 - #53942 (Rewrite `precompute_borrows_out_of_scope` for fewer hash table lookups.)
 - #53973 (Have rust-lldb look for the rust-enabled lldb)
 - #53981 (Implement initializer() for FileDesc)
 - #53987 (rustbuild: allow configuring llvm version suffix)
 - #53993 (rustc_resolve: don't record uniform_paths canaries as reexports.)
 - #54007 (crates that provide a `panic_handler` are exempt from the `unused_extern_crates` lint)
 - #54040 (update books for next release)
 - #54050 (Update `petgraph` dependency to 0.4.13 to fix build with nightly)
@bors
Copy link
Contributor

bors commented Sep 8, 2018

☔ The latest upstream changes (presumably #54051) 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 Sep 8, 2018
@bors bors merged commit 6c4f3f5 into rust-lang:master Sep 8, 2018
@japaric japaric deleted the gh53964 branch September 8, 2018 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants