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 #64687

Closed
wants to merge 59 commits into from
Closed

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Sep 22, 2019

Successful merges:

Failed merges:

r? @ghost

wchargin and others added 30 commits September 8, 2019 14:12
Summary:
Invoking `rev` does not add a trailing newline when none is present in
the input (at least on my Debian). Nearby examples use `echo` rather
than `rev`, which probably explains the source of the discrepancy.

Also, a `mut` qualifier is unused.

Test Plan:
Copy the code block into <https://play.rust-lang.org> with a `fn main`
wrapper, and run it. Note that it compiles and runs cleanly; prior to
this commit, it would emit an `unused_mut` warning and then panic.

wchargin-branch: stdio-piped-docs
Pacify `tidy`. It's also more correct in this context.
Mark-Simulacrum and others added 17 commits September 21, 2019 16:14
also removed some duplicated logic from TypeRelation methods.
…crichton

panic=abort support in libtest

Add experimental support for tests compiled with panic=abort. Enabled with `-Z panic_abort_tests`.

r? @alexcrichton
cc @cramertj
… r=Dylan-DPC

Fix `Stdio::piped` example code and lint

Summary:
Invoking `rev` does not add a trailing newline when none is present in
the input (at least on my Debian). Nearby examples use `echo` rather
than `rev`, which probably explains the source of the discrepancy.

Also, a `mut` qualifier is unused.

Test Plan:
Copy the code block into <https://play.rust-lang.org> with a `fn main`
wrapper, and run it. Note that it compiles and runs cleanly; prior to
this commit, it would emit an `unused_mut` warning and then panic.

wchargin-branch: stdio-piped-docs
or-patterns: Push `PatKind/PatternKind::Or` at top level to HIR & HAIR

Following up on work in rust-lang#64111, rust-lang#63693, and rust-lang#61708, in this PR:

- We change `hair::Arm.patterns: Vec<Pattern<'_>>` into `hir::Arm.pattern: Pattern<'_>`.

   - `fn hair::Arm::top_pats_hack` is introduced as a temporary crutch in MIR building to avoid more changes.

- We change `hir::Arm.pats: HirVec<P<Pat>>` into `hir::Arm.pat: P<Pat>`.

   - The hacks in `rustc::hir::lowering` are removed since the representation hack is no longer necessary.

   - In some places, `fn hir::Arm::top_pats_hack` is introduced to leave some things as future work.

   - Misc changes: HIR pretty printing is adjusted to behave uniformly wrt. top/inner levels, rvalue promotion is adjusted, regionck, and dead_code is also.

   - Type checking is adjusted to uniformly handle or-patterns at top/inner levels.
      To make things compile, `p_0 | ... | p_n` is redefined as a "reference pattern" in [`fn is_non_ref_pat`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_typeck/check/struct.FnCtxt.html#method.is_non_ref_pat) for now. This is done so that reference types are not eagerly stripped from the `expected: Ty<'tcx>`.

    - Liveness is adjusted wrt. the `unused_variables` and `unused_assignments` lints to handle top/inner levels uniformly and the handling of `fn` parameters, `let` locals, and `match` arms are unified in this respect. This is not tested for now as exhaustiveness checks are reachable and will ICE.

    - In `check_match`, checking `@` and by-move bindings is adjusted. However, exhaustiveness checking is not adjusted the moment and is handled by @dlrobertson in rust-lang#63688.

    - AST borrowck (`construct.rs`) is not adjusted as AST borrowck will be removed soon.

r? @matthewjasper
cc @dlrobertson @varkor @oli-obk
…e-tests, r=nikomatsakis

Bugfix/rfc 2451 rerebalance tests

r? @nikomatsakis

Fixes rust-lang#64412
Depends/Contains on rust-lang#64414

cc rust-lang#55437 and rust-lang#63599
… r=petrochenkov

Cleanup syntax::ext::build

I suspect most of this code could be inlined but I only removed the bits where the inlining didn't really hurt readability (i.e., method call -> function call) or the completely unused code.
…tril

Propagate `types.err` in locals further to avoid spurious knock-down errors

Fix rust-lang#33575, fix rust-lang#44504.
…c, r=petrochenkov

Parse assoc type bounds in generic params and provide custom diagnostic

Fix rust-lang#26271.
Infer consts more consistently

Moved some duplicated logic in `TypeRelation` methods into `super_combined_consts`. Before some `TypeRelation`s like `Lub` wasn't using `replace_if_possible`, meaning some inference types were staying around longer than they should be.

Fixes rust-lang#64519

r? @varkor
@Centril
Copy link
Contributor Author

Centril commented Sep 22, 2019

@bors r+ p=9 rollup=never

@bors
Copy link
Contributor

bors commented Sep 22, 2019

📌 Commit afd1c60 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 Sep 22, 2019
@bors
Copy link
Contributor

bors commented Sep 22, 2019

⌛ Testing commit afd1c60 with merge 2fe02dd9d0ab22a65224434966ae88436309ea44...

@rust-highfive
Copy link
Collaborator

The job dist-i586-gnu-i586-i686-musl 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.
2019-09-22T18:30:31.1252218Z ---- [ui] ui/panic-runtime/libtest-unwinds.rs stdout ----
2019-09-22T18:30:31.1252301Z 
2019-09-22T18:30:31.1252400Z error: ui test compiled successfully!
2019-09-22T18:30:31.1252477Z status: exit code: 0
2019-09-22T18:30:31.1253694Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/panic-runtime/libtest-unwinds.rs" "-Zthreads=1" "--target=i686-unknown-linux-musl" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panic-runtime/libtest-unwinds" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/i686-unknown-linux-musl/native/rust-test-helpers" "-Clinker=/musl-i686/bin/musl-gcc" "-C" "panic=abort" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panic-runtime/libtest-unwinds/auxiliary" "-A" "unused"
2019-09-22T18:30:31.1254299Z ------------------------------------------
2019-09-22T18:30:31.1254355Z 
2019-09-22T18:30:31.1254621Z ------------------------------------------
2019-09-22T18:30:31.1254703Z stderr:
---
2019-09-22T18:30:31.1306201Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:536:22
2019-09-22T18:30:31.1306829Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-09-22T18:30:31.1324645Z 
2019-09-22T18:30:31.1324778Z 
2019-09-22T18:30:31.1331802Z 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/i686-unknown-linux-musl/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-i686-unknown-linux-musl" "--mode" "ui" "--target" "i686-unknown-linux-musl" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--linker" "/musl-i686/bin/musl-gcc" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/i686-unknown-linux-musl/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.39.0-nightly\n" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2019-09-22T18:30:31.1333103Z 
2019-09-22T18:30:31.1333162Z 
2019-09-22T18:30:31.1345589Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --target i586-unknown-linux-gnu,i686-unknown-linux-musl
2019-09-22T18:30:31.1345756Z Build completed unsuccessfully in 1:40:26
2019-09-22T18:30:31.1345756Z Build completed unsuccessfully in 1:40:26
2019-09-22T18:30:31.1407868Z == clock drift check ==
2019-09-22T18:30:31.1420662Z   local time: Sun Sep 22 18:30:31 UTC 2019
2019-09-22T18:30:31.2467157Z   network time: Sun, 22 Sep 2019 18:30:31 GMT
2019-09-22T18:30:31.2467687Z == end clock drift check ==
2019-09-22T18:30:32.3014157Z ##[error]Bash exited with code '1'.
2019-09-22T18:30:32.3058114Z ##[section]Starting: Upload CPU usage statistics
2019-09-22T18:30:32.3071181Z ==============================================================================
2019-09-22T18:30:32.3071311Z Task         : Bash
2019-09-22T18:30:32.3071412Z Description  : Run a Bash script on macOS, Linux, or Windows

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 Sep 22, 2019

💔 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 Sep 22, 2019
@Centril Centril closed this Sep 22, 2019
@Centril Centril deleted the rollup-3baihj5 branch September 22, 2019 18:58
@Centril Centril added the rollup A PR which is a rollup label Oct 24, 2019
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.