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

Deny rust_2018_idioms globally #60133

Merged
merged 4 commits into from
Apr 22, 2019
Merged

Conversation

phansch
Copy link
Member

@phansch phansch commented Apr 20, 2019

@rust-highfive
Copy link
Collaborator

r? @alexcrichton

(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 Apr 20, 2019
@rust-highfive

This comment has been minimized.

@phansch
Copy link
Member Author

phansch commented Apr 20, 2019

Looks like src/liballoc/tests/ is still missing #![deny(rust_2018_idioms)]. I'll see if I can fix it.

@rust-highfive

This comment has been minimized.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.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.
travis_time:end:0a8b9aa0:start=1555778769937170543,finish=1555778861195674319,duration=91258503776
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
travis_time:start:test_assembly
Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:13:59] 
[01:13:59] running 9 tests
[01:13:59] iiiiiiiii
[01:13:59] 
[01:13:59]  finished in 0.158
[01:13:59] travis_fold:end:test_assembly

---
travis_time:start:test_debuginfo
Check compiletest suite=debuginfo mode=debuginfo-both (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:14:15] 
[01:14:15] running 121 tests
[01:14:40] .iiiii...i.....i..i...i..i.i.i..i.ii...i.....i..i....i..........iiii..........i...ii...i.......ii.i. 100/121
[01:14:44] i.i......iii.i.....ii
[01:14:44] 
[01:14:44]  finished in 29.577
[01:14:44] travis_fold:end:test_debuginfo

---
[01:39:01]   |
[01:39:01] 1 | extern crate serialize as rustc_serialize;
[01:39:01]   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert it to a `use`
[01:39:01]   |
[01:39:01]   = note: `-D unused-extern-crates` implied by `-D rust-2018-idioms`
[01:39:01] error: aborting due to previous error
[01:39:01] 
[01:39:01] error: Could not compile `serialize`.
[01:39:01] warning: build failed, waiting for other jobs to finish...
[01:39:01] warning: build failed, waiting for other jobs to finish...
[01:39:01] error: `extern crate` is not idiomatic in the new edition
[01:39:01]  --> src/libserialize/tests/json.rs:1:1
[01:39:01]   |
[01:39:01] 1 | extern crate serialize as rustc_serialize;
[01:39:01]   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert it to a `use`
[01:39:01]   |
[01:39:01]   = note: `-D unused-extern-crates` implied by `-D rust-2018-idioms`
[01:39:01] error: aborting due to previous error
[01:39:01] 
[01:39:01] error: Could not compile `serialize`.
[01:39:01] warning: build failed, waiting for other jobs to finish...
[01:39:01] warning: build failed, waiting for other jobs to finish...
[01:39:05] error: build failed
[01:39:05] 
[01:39:05] 
[01:39:05] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" "" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "-p" "serialize" "--" "--quiet"
[01:39:05] 
[01:39:05] 
[01:39:05] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:39:05] Build completed unsuccessfully in 0:36:54
[01:39:05] Build completed unsuccessfully in 0:36:54
[01:39:05] Makefile:48: recipe for target 'check' failed
[01:39:05] make: *** [check] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0047aa40
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Sat Apr 20 18:26:56 UTC 2019
---
travis_time:end:0e26b56b:start=1555784817622832312,finish=1555784817681360345,duration=58528033
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:08fbe04e
$ 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:1f77a708
$ 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)

@phansch phansch changed the title Deny rust_2018_idioms globally WIP: Deny rust_2018_idioms globally Apr 20, 2019
@Centril
Copy link
Contributor

Centril commented Apr 20, 2019

r? @Centril

@phansch phansch changed the title WIP: Deny rust_2018_idioms globally Deny rust_2018_idioms globally Apr 21, 2019
@phansch
Copy link
Member Author

phansch commented Apr 21, 2019

I'm not sure if there are alternatives to 8e55559. Apart from that, I think this PR is ready.

@Centril
Copy link
Contributor

Centril commented Apr 22, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Apr 22, 2019

📌 Commit 8e55559 has been approved by Centril

@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 Apr 22, 2019
@bors
Copy link
Contributor

bors commented Apr 22, 2019

⌛ Testing commit 8e55559 with merge 5452576bb46d2a07c49410acf86898e1f9790883...

@bors
Copy link
Contributor

bors commented Apr 22, 2019

💔 Test failed - checks-travis

@rust-highfive
Copy link
Collaborator

The job asmjs 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:18:26] test [run-pass] run-pass/associated-types/associated-types-projection-in-supertrait.rs ... ok
[01:18:27] test [run-pass] run-pass/associated-types/associated-types-projection-in-where-clause.rs ... ok
[01:18:27] test [run-pass] run-pass/associated-types/associated-types-projection-to-unrelated-trait.rs ... ok
[01:18:28] test [run-pass] run-pass/associated-types/associated-types-qualified-path-with-trait-with-type-parameters.rs ... ok
No output has been received in the last 30m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
The build has been terminated

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 Apr 22, 2019
@Centril
Copy link
Contributor

Centril commented Apr 22, 2019

@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 Apr 22, 2019
@bors
Copy link
Contributor

bors commented Apr 22, 2019

⌛ Testing commit 8e55559 with merge a850a42...

bors added a commit that referenced this pull request Apr 22, 2019
@@ -7,6 +7,7 @@
#![feature(try_reserve)]
#![feature(unboxed_closures)]
#![feature(vecdeque_rotate)]
#![deny(rust_2018_idioms)]
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand why it's denied here if it was denied in rustbuild already.
Also, why aren't all the deny(rust_2018_idioms)s in specific crates removed?

Copy link
Contributor

Choose a reason for hiding this comment

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

We can remove them in a follow up. However, I personally prefer to keep them as it works better when you cargo check a crate without x.py.

@bors
Copy link
Contributor

bors commented Apr 22, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: Centril
Pushing a850a42 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 22, 2019
@bors bors merged commit 8e55559 into rust-lang:master Apr 22, 2019
@phansch phansch deleted the deny_rust_2018_idioms branch April 22, 2019 10:31

extern crate core;
extern crate test;
Copy link
Member

Choose a reason for hiding this comment

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

Any idea why you didn't also have to remove this line? It causes a build failure when building the tests "from the outside" at https://travis-ci.org/RalfJung/miri-test-libstd/builds/523334973.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not really sure. Do you maybe have to pass --test in order for the crate to be used?

Copy link
Member

Choose a reason for hiding this comment

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

Hm, no... removing it actually makes it fail in x.py. But somehow it is considered redundant when compiled in a less magic environment?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think adding #[allow(unused_extern_crates)] before extern crate test; should fix it (like here), but I won't be able to actually try it out until later today.

Copy link
Member

Choose a reason for hiding this comment

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

This should also work: #60201

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.

7 participants