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 12 pull requests #82352

Closed
wants to merge 30 commits into from
Closed

Conversation

JohnTitor
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

ssomers and others added 30 commits February 9, 2021 11:21
Windows does not allow deleting currently running executables
Using `i32` is rather fragile because it has many implementations -
and indeed I'm about to add one.

TryFromSliceError is nice because it doesn't seem likely to grow new
conversions.  We still have one conversion, from Infallible.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
paramater -> parameter
old:

```
real	0m11.123s
user	0m14.495s
sys	0m5.227s
```

new:

```
real	0m2.767s
user	0m13.014s
sys	0m1.691s
```
Pretty formatter when using multiple test threads displays test name twice on
timeout event. This implicitly suggest that those are two different events,
while in fact they are always printed together.

Print test name only once.

Before:

```
running 3 tests
test src/lib.rs - c (line 16) ... ok
test src/lib.rs - a (line 3) ... ok
test src/lib.rs - b (line 9) ... test src/lib.rs - b (line 9) has been running for over 60 seconds
test src/lib.rs - b (line 9) ... ok
```

After:

```
running 3 tests
test src/lib.rs - c (line 16) ... ok
test src/lib.rs - a (line 3) ... ok
test src/lib.rs - b (line 9) has been running for over 60 seconds
test src/lib.rs - b (line 9) ... ok
```
…=Mark-Simulacrum

BTree: share panicky test code & test panic during clear, clone

Bases almost all tests of panic on the same, richer definition, and extends it to cloning to test panic during clone.

r? `@Mark-Simulacrum`
…e, r=Mark-Simulacrum

Document BinaryHeap unsafe functions

`BinaryHeap` contains some private safe functions but that are actually unsafe to call. This PR marks them `unsafe` and documents all the `unsafe` function calls inside them.

While doing this I might also have found a bug: some "SAFETY" comments in `sift_down_range` and `sift_down_to_bottom` are valid only if you assume that `child` doesn't overflow. However it may overflow if `end > isize::MAX` which can be true for ZSTs (but I think only for them). I guess the easiest fix would be to skip any sifting if `mem::size_of::<T> == 0`.

Probably conflicts with rust-lang#81127 but solving the eventual merge conflict should be pretty easy.
… r=Mark-Simulacrum

parallelize x.py test tidy

Running tidy on individual commits when rewriting git history was somewhat of an annoyance, so I have parallelized it a bit.

running `time ./x.py test tidy` with warm IO caches:

old:

```
real	0m11.123s
user	0m14.495s
sys	0m5.227s
```

new:

```
real	0m1.834s
user	0m13.545s
sys	0m3.094s
```

There's further room for improvement (<0.9s should be feasible) but that would require bigger changes.
…imulacrum

Avoid `cfg_if` in `std::os`

rust-analyzer cannot currently load the `cfg_if` crate, which means that rust-analyzer is unable to see `std::os::{unix, windows, linux}` here. This works around that by avoiding `cfg_if`; the `#[cfg]` expressions are simple enough to reasonably write by hand.

Fixes rust-lang/rust-analyzer#6038
Update RELEASES.md 1.50 to include methods stabilized in rust-lang#79342

I noticed that rust-lang#79342 was missing from the release notes for 1.50.
…r=Mark-Simulacrum

Do not delete bootstrap.exe on Windows during clean

Windows does not allow deleting currently running executables.

This an addition to `@jyn514's` change in rust-lang#80574.
…k-Simulacrum

Add check for ES5 in CI

Follow-up of rust-lang#82145.

r? `@Mark-Simulacrum`
…ulacrum

Add [A-diagnostics] bug report template
…k-Simulacrum

try-back-block-type test: Use TryFromSliceError for From test

Using `i32` is rather fragile because it has many implementations.  Recently in an early draft of another MR (rust-lang#82228) I did something that introduced a new `i32 as From<something>` impl and this test broke.

TryFromSliceError is nice because it doesn't seem likely to grow new conversions.  We still have one conversion, from Infallible.

My other MR is going to be reworked and won't need this any more but having done it I thought I would submit it rather than just throw it away.  Sorry for the tiny MR.
…mulacrum

Remove unsafe impl Send for CompletedTest & TestResult
Fix typo in generics.rs

paramater -> parameter
…-Simulacrum

test: Print test name only once on timeout

Pretty formatter when using multiple test threads displays test name twice on
timeout event. This implicitly suggest that those are two different events,
while in fact they are always printed together.

Print test name only once.

Before:

```
running 3 tests
test src/lib.rs - c (line 16) ... ok
test src/lib.rs - a (line 3) ... ok
test src/lib.rs - b (line 9) ... test src/lib.rs - b (line 9) has been running for over 60 seconds
test src/lib.rs - b (line 9) ... ok
```

After:

```
running 3 tests
test src/lib.rs - c (line 16) ... ok
test src/lib.rs - a (line 3) ... ok
test src/lib.rs - b (line 9) has been running for over 60 seconds
test src/lib.rs - b (line 9) ... ok
```
@rustbot rustbot added the rollup A PR which is a rollup label Feb 21, 2021
@JohnTitor
Copy link
Member Author

@bors r+ p=12 rollup=never

@bors
Copy link
Contributor

bors commented Feb 21, 2021

📌 Commit 73747ec has been approved by JohnTitor

@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 Feb 21, 2021
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-9 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
.................................................................................................... 9200/11472
.................................................................................................... 9300/11472
.................................................................................................... 9400/11472
.............................i......i............................................................... 9500/11472
....................................................................iiiiiii..iiiiii.i............... 9600/11472
.................................................................................................... 9800/11472
.................................................................................................... 9900/11472
.................................................................................................... 10000/11472
.................................................................................................... 10100/11472
---

---- [ui] ui/const-generics/diagnostics.rs stdout ----
diff of stderr:

33 LL | impl<N> Foo for B<N> {}
34    |      -            ^
35    |      |
-    |      help: consider changing this type paramater to a `const`-generic: `const N: u8`
Some tests failed in compiletest suite=ui mode=ui host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
+    |      help: consider changing this type parameter to a `const`-generic: `const N: u8`
38 error[E0747]: unresolved item provided when a constant was expected
39   --> $DIR/diagnostics.rs:16:32



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/diagnostics/diagnostics.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args const-generics/diagnostics.rs`
error: 1 errors occurred comparing output.
status: exit code: 1
status: exit code: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/const-generics/diagnostics.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zemit-future-incompat-report" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/diagnostics" "-A" "unused" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/diagnostics/auxiliary"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
error[E0412]: cannot find type `N` in this scope
  --> /checkout/src/test/ui/const-generics/diagnostics.rs:7:16
   |
LL | struct A<const N: u8>;
   | ---------------------- similarly named struct `A` defined here
LL | trait Foo {}
LL | impl Foo for A<N> {}
   |                ^ help: a struct with a similar name exists: `A`
error[E0412]: cannot find type `T` in this scope
  --> /checkout/src/test/ui/const-generics/diagnostics.rs:16:32
   |
   |
LL | struct A<const N: u8>;
   | ---------------------- similarly named struct `A` defined here
...
LL | impl<const N: u8> Foo for C<N, T> {}
   |                                ^ help: a struct with a similar name exists: `A`
error[E0747]: unresolved item provided when a constant was expected
  --> /checkout/src/test/ui/const-generics/diagnostics.rs:7:16
   |
   |
LL | impl Foo for A<N> {}
   |
   |
help: if this generic argument was intended as a const parameter, surround it with braces
   |
LL | impl Foo for A<{ N }> {}
   |                ^   ^
error[E0747]: type provided when a constant was expected
  --> /checkout/src/test/ui/const-generics/diagnostics.rs:12:19
   |
   |
LL | impl<N> Foo for B<N> {}
   |      -            ^
   |      |
   |      help: consider changing this type parameter to a `const`-generic: `const N: u8`
error[E0747]: unresolved item provided when a constant was expected
  --> /checkout/src/test/ui/const-generics/diagnostics.rs:16:32
   |
   |
LL | impl<const N: u8> Foo for C<N, T> {}
   |
   |
help: if this generic argument was intended as a const parameter, surround it with braces
   |
LL | impl<const N: u8> Foo for C<N, { T }> {}
   |                                ^   ^
error: aborting due to 5 previous errors

Some errors have detailed explanations: E0412, E0747.
For more information about an error, try `rustc --explain E0412`.
---
test result: FAILED. 11378 passed; 1 failed; 93 ignored; 0 measured; 0 filtered out; finished in 136.99s



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-linux-gnu" "--suite" "ui" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-9/bin/FileCheck" "--nodejs" "/usr/bin/node" "--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/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python3" "--lldb-python" "/usr/bin/python3" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "9.0.0" "--llvm-components" "aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets amdgpu amdgpuasmparser amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgpuutils analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfomsf debuginfopdb demangle dlltooldriver engine executionengine fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interpreter ipo irreader jitlink lanai lanaiasmparser lanaicodegen lanaidesc lanaidisassembler lanaiinfo libdriver lineeditor linker lto mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts object objectyaml option orcjit passes perfjitevents powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvutils runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target textapi transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86utils xcore xcorecodegen xcoredesc xcoredisassembler xcoreinfo xray" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"


failed to run: /checkout/obj/build/bootstrap/debug/bootstrap --stage 2 test --exclude src/tools/tidy
Build completed unsuccessfully in 0:13:34

@JohnTitor JohnTitor closed this Feb 21, 2021
@JohnTitor JohnTitor deleted the rollup-w02nh68 branch February 21, 2021 01:49
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-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.