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

Rollup of 9 pull requests #68124

Closed
wants to merge 50 commits into from
Closed

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Jan 11, 2020

Successful merges:

Failed merges:

r? @ghost

GuillaumeGomez and others added 30 commits January 9, 2020 22:25
This also allows us to use the `const_eval` query again without causing cycles
ecstatic-morse and others added 17 commits January 10, 2020 17:18
This flag opts out of the min-const-fn checks entirely, which is usually
not what we want. The few cases where the flag is still necessary have
been annotated.
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
Also fix a bug with the span passed in `mk_range`.
…ce, r=oli-obk

Promote references to constants instead of statics

r? @oli-obk
Compile some CGUs in parallel at the start of codegen

This brings the compilation time for `syntex_syntax` from 11.542s to 10.453s with 6 threads in non-incremental debug mode. Just compiling `n` CGUs in parallel at the beginning of codegen seems sufficient to get rid of the staircase effect, at least for `syntex_syntax`.

Based on rust-lang#67777.

r? @michaelwoerister
cc @alexcrichton @Mark-Simulacrum
feature_gate: Remove `GateStrength`

The "soft feature gating" from `feature_gate/check.rs` is unused, and even if it were used, hardcoded warning is not a good solution and [deny-by-default lint](rust-lang#64266) would be a better way to do this.

cc rust-lang#67806 (comment)
r? @Centril
…r=Centril

Don't require `allow_internal_unstable` unless `staged_api` is enabled.

rust-lang#63770 changed `qualify_min_const_fn` to require `allow_internal_unstable` for *all* crates that used an unstable feature, regardless of whether `staged_api` was enabled or the `fn` that used that feature was stably const. In practice, this meant that every crate in the ecosystem that wanted to use nightly features added `#![feature(const_fn)]`, which skips `qualify_min_const_fn` entirely.

After this PR, crates that do not have `#![feature(staged_api)]` will only need to enable the feature they are interested in. For example, `#![feature(const_if_match)]` will be enough to enable `if` and `match` in constants. Crates with `staged_api` (e.g., `libstd`) require `#[allow_internal_unstable]` to be added to a function if it uses nightly features unless that function is also marked `#[rustc_const_unstable]`. This prevents proliferation of `#[allow_internal_unstable]` into functions that are not callable in a `const` context on stable.

r? @oli-obk (author of rust-lang#63770)
cc @Centril
…li-obk

Ban `...X` pats, harden tests, and improve diagnostics

Follow up to rust-lang#67258 (comment) and rust-lang#67258 (comment).

r? @cramertj @oli-obk
@Centril
Copy link
Contributor Author

Centril commented Jan 11, 2020

@bors r+ p=9 rollup=never

@bors
Copy link
Contributor

bors commented Jan 11, 2020

📌 Commit b8f6eb9 has been approved by Centril

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jan 11, 2020
@Centril Centril added the rollup A PR which is a rollup label Jan 11, 2020
@bors
Copy link
Contributor

bors commented Jan 11, 2020

⌛ Testing commit b8f6eb9 with merge 13ad02f...

bors added a commit that referenced this pull request Jan 11, 2020
Rollup of 9 pull requests

Successful merges:

 - #67000 (Promote references to constants instead of statics)
 - #67756 (Collector tweaks)
 - #67889 (Compile some CGUs in parallel at the start of codegen)
 - #67930 (Rename Result::as_deref_ok to as_deref)
 - #68018 (feature_gate: Remove `GateStrength`)
 - #68070 (clean up E0185 explanation)
 - #68072 (Fix ICE #68058)
 - #68114 (Don't require `allow_internal_unstable` unless `staged_api` is enabled.)
 - #68120 (Ban `...X` pats, harden tests, and improve diagnostics)

Failed merges:

r? @ghost
@rust-highfive
Copy link
Collaborator

The job i686-gnu of your PR failed (pretty log, 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.
2020-01-11T11:30:52.5685671Z failures:
2020-01-11T11:30:52.5691236Z 
2020-01-11T11:30:52.5691934Z ---- [codegen] codegen/consts.rs stdout ----
2020-01-11T11:30:52.5692063Z 
2020-01-11T11:30:52.5692326Z error: verification with 'FileCheck' failed
2020-01-11T11:30:52.5692385Z status: exit code: 1
2020-01-11T11:30:52.5692767Z command: "/checkout/obj/build/i686-unknown-linux-gnu/llvm/build/bin/FileCheck" "--input-file" "/checkout/obj/build/i686-unknown-linux-gnu/test/codegen/consts/consts.ll" "/checkout/src/test/codegen/consts.rs"
2020-01-11T11:30:52.5693565Z ------------------------------------------
2020-01-11T11:30:52.5695092Z 
2020-01-11T11:30:52.5695428Z ------------------------------------------
2020-01-11T11:30:52.5695668Z stderr:
2020-01-11T11:30:52.5695668Z stderr:
2020-01-11T11:30:52.5696968Z ------------------------------------------
2020-01-11T11:30:52.5697074Z /checkout/src/test/codegen/consts.rs:17:11: error: CHECK: expected string not found in input
2020-01-11T11:30:52.5698556Z // CHECK: [[LOW_HIGH:@[0-9]+]] = {{.*}} getelementptr inbounds (<{ [8 x i8] }>, <{ [8 x i8] }>* @2, i32 0, i32 0, i32 0), {{.*}}, align 8
2020-01-11T11:30:52.5698693Z           ^
2020-01-11T11:30:52.5699037Z /checkout/obj/build/i686-unknown-linux-gnu/test/codegen/consts/consts.ll:12:1: note: scanning from here
2020-01-11T11:30:52.5699163Z @1 = private unnamed_addr constant <{ i8*, [0 x i8] }> <{ i8* getelementptr inbounds (<{ [4 x i8] }>, <{ [4 x i8] }>* @0, i32 0, i32 0, i32 0), [0 x i8] zeroinitializer }>, align 4
2020-01-11T11:30:52.5699260Z ^
2020-01-11T11:30:52.5699516Z /checkout/obj/build/i686-unknown-linux-gnu/test/codegen/consts/consts.ll:14:42: note: possible intended match here
2020-01-11T11:30:52.5699637Z @3 = private unnamed_addr constant <{ i8*, [0 x i8] }> <{ i8* getelementptr inbounds (<{ [8 x i8] }>, <{ [8 x i8] }>* @2, i32 0, i32 0, i32 0), [0 x i8] zeroinitializer }>, align 4
2020-01-11T11:30:52.5699810Z /checkout/src/test/codegen/consts.rs:47:11: error: CHECK: expected string not found in input
2020-01-11T11:30:52.5699810Z /checkout/src/test/codegen/consts.rs:47:11: error: CHECK: expected string not found in input
2020-01-11T11:30:52.5699898Z // CHECK: load %"E<i16, [i16; 3]>"*, %"E<i16, [i16; 3]>"** bitcast (<{ i8*, [0 x i8] }>* [[LOW_HIGH]] to %"E<i16, [i16; 3]>"**), align 8
2020-01-11T11:30:52.5699994Z           ^
2020-01-11T11:30:52.5700260Z /checkout/obj/build/i686-unknown-linux-gnu/test/codegen/consts/consts.ll:38:29: note: scanning from here
2020-01-11T11:30:52.5700349Z define void @low_align_const(%"E<i16, [i16; 3]>"* noalias nocapture sret dereferenceable(8)) unnamed_addr #0 {
2020-01-11T11:30:52.5700433Z                             ^
2020-01-11T11:30:52.5700693Z /checkout/obj/build/i686-unknown-linux-gnu/test/codegen/consts/consts.ll:38:29: note: uses undefined variable(s): "LOW_HIGH"
2020-01-11T11:30:52.5700801Z define void @low_align_const(%"E<i16, [i16; 3]>"* noalias nocapture sret dereferenceable(8)) unnamed_addr #0 {
2020-01-11T11:30:52.5701053Z                             ^
2020-01-11T11:30:52.5701516Z /checkout/obj/build/i686-unknown-linux-gnu/test/codegen/consts/consts.ll:40:8: note: possible intended match here
2020-01-11T11:30:52.5701644Z  %_2 = load %"E<i16, [i16; 3]>"*, %"E<i16, [i16; 3]>"** bitcast (<{ i8*, [0 x i8] }>* @3 to %"E<i16, [i16; 3]>"**), align 4, !nonnull !2
2020-01-11T11:30:52.5701853Z /checkout/src/test/codegen/consts.rs:55:11: error: CHECK: expected string not found in input
2020-01-11T11:30:52.5701853Z /checkout/src/test/codegen/consts.rs:55:11: error: CHECK: expected string not found in input
2020-01-11T11:30:52.5701937Z // CHECK: load %"E<i16, i32>"*, %"E<i16, i32>"** bitcast (<{ i8*, [0 x i8] }>* [[LOW_HIGH]] to %"E<i16, i32>"**), align 8
2020-01-11T11:30:52.5702022Z           ^
2020-01-11T11:30:52.5702315Z /checkout/obj/build/i686-unknown-linux-gnu/test/codegen/consts/consts.ll:48:30: note: scanning from here
2020-01-11T11:30:52.5702403Z define void @high_align_const(%"E<i16, i32>"* noalias nocapture sret dereferenceable(8)) unnamed_addr #0 {
2020-01-11T11:30:52.5702491Z                              ^
2020-01-11T11:30:52.5702799Z /checkout/obj/build/i686-unknown-linux-gnu/test/codegen/consts/consts.ll:48:30: note: uses undefined variable(s): "LOW_HIGH"
2020-01-11T11:30:52.5702910Z define void @high_align_const(%"E<i16, i32>"* noalias nocapture sret dereferenceable(8)) unnamed_addr #0 {
2020-01-11T11:30:52.5702989Z                              ^
2020-01-11T11:30:52.5703281Z /checkout/obj/build/i686-unknown-linux-gnu/test/codegen/consts/consts.ll:50:2: note: possible intended match here
2020-01-11T11:30:52.5703392Z  %_2 = load %"E<i16, i32>"*, %"E<i16, i32>"** bitcast (<{ i8*, [0 x i8] }>* @3 to %"E<i16, i32>"**), align 4, !nonnull !2
2020-01-11T11:30:52.5703495Z 
2020-01-11T11:30:52.5703712Z ------------------------------------------
2020-01-11T11:30:52.5703751Z 
2020-01-11T11:30:52.5703794Z 
---
2020-01-11T11:30:52.5704939Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:386:22
2020-01-11T11:30:52.5705047Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2020-01-11T11:30:52.5710013Z 
2020-01-11T11:30:52.5710800Z 
2020-01-11T11:30:52.5714574Z command did not execute successfully: "/checkout/obj/build/i686-unknown-linux-gnu/stage0-tools-bin/compiletest" "/checkout/obj/build/i686-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/i686-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/i686-unknown-linux-gnu/stage2/lib/rustlib/i686-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/i686-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/codegen" "--build-base" "/checkout/obj/build/i686-unknown-linux-gnu/test/codegen" "--stage-id" "stage2-i686-unknown-linux-gnu" "--mode" "codegen" "--target" "i686-unknown-linux-gnu" "--host" "i686-unknown-linux-gnu" "--llvm-filecheck" "/checkout/obj/build/i686-unknown-linux-gnu/llvm/build/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/i686-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/i686-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--llvm-version" "9.0.0-rust-1.42.0-nightly\n" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2020-01-11T11:30:52.5715106Z 
2020-01-11T11:30:52.5715137Z 
2020-01-11T11:30:52.5730121Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --exclude src/bootstrap --exclude src/test/rustdoc-js --exclude src/tools/error_index_generator --exclude src/tools/linkchecker
2020-01-11T11:30:52.5730250Z Build completed unsuccessfully in 1:10:56
2020-01-11T11:30:52.5730250Z Build completed unsuccessfully in 1:10:56
2020-01-11T11:30:52.5773524Z == clock drift check ==
2020-01-11T11:30:52.5788884Z   local time: Sat Jan 11 11:30:52 UTC 2020
2020-01-11T11:30:52.7141537Z   network time: Sat, 11 Jan 2020 11:30:52 GMT
2020-01-11T11:30:52.7144212Z == end clock drift check ==
2020-01-11T11:30:54.8171194Z 
2020-01-11T11:30:54.8258292Z ##[error]Bash exited with code '1'.
2020-01-11T11:30:54.8295595Z ##[section]Starting: Checkout
2020-01-11T11:30:54.8297864Z ==============================================================================
2020-01-11T11:30:54.8297959Z Task         : Get sources
2020-01-11T11:30:54.8298154Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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
Copy link
Contributor

bors commented Jan 11, 2020

💔 Test failed - checks-azure

@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 Jan 11, 2020
@Centril Centril closed this Jan 11, 2020
@Centril Centril deleted the rollup-4h2ybcj branch January 11, 2020 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.