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 5 pull requests #90860

Closed
wants to merge 11 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

vandenheuvel and others added 11 commits November 4, 2021 15:09
…d the conclusion that the code readibility wasn't worth the almost unnoticeable perf improvement
…sts, r=wesleywiser

Group commandline tests in a directory

I grouped the `ui/command*` tests in `ui/command/argfile/` and `rustdoc-ui/command*` in `rustdoc-ui/commandline-argfile/`.
…ostics, r=estebank

Improve diagnostics when a static lifetime is expected

Makes progress towards rust-lang#90600

The diagnostics here were previously entirely removed due to giving a misleading suggestion but if we instead provide an informative label in that same location it should better help the user understand the situation.

I included the example from the issue as it demonstrates an area where the diagnostics are still lacking.
Happy to remove that if its just adding noise atm.
…ance, r=camelid

Remove unneeded FIXMEs comments in search index generation

Original comment:

> Instead of recreating a new `vec` for each arguments, we re-use the same. The impact on performance should be minor but worth a try.

After testing it, we reached the conclusion that the code readability drop wasn't worth the almost unnoticeable performance improvement.

r? ``@camelid``
…e, r=michaelwoerister

Fix trait object error code

closes rust-lang#90768

I `grep`:d and changed the occurrences that seemed relevant. Please let me know what you think and if anything is missing!
…e_inputs_output, r=jackh726

Normalize both arguments of `equate_normalized_input_or_output`

Fixes rust-lang#90638
Fixes rust-lang#90612

Temporary fix for a more complex underlying problem stemming from an inability to normalize closure substs during typecheck.

r? ``@jackh726``
@rustbot rustbot added the rollup A PR which is a rollup label Nov 13, 2021
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Nov 13, 2021

📌 Commit 441342b has been approved by matthiaskrgr

@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 Nov 13, 2021
@bors
Copy link
Contributor

bors commented Nov 13, 2021

⌛ Testing commit 441342b with merge 4f09582234ecef58514434a5bda07ff6aeb40c9f...

@bors
Copy link
Contributor

bors commented Nov 13, 2021

💔 Test failed - checks-actions

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

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

Click to see the possible cause of the failure (guessed by this bot)

---- [ui (nll)] ui/closures/closure-bounds-static-cant-capture-borrowed.rs stdout ----
diff of stderr:

1 error[E0621]: explicit lifetime required in the type of `x`
3    |
3    |
+ LL |   fn foo(x: &()) {
+    |             --- the type of `x` does not have lifetime `'static'`
4 LL | /     bar(|| {
5 LL | |
6 LL | |         let _ = x;

The actual stderr differed from the expected stderr.
The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/closures/closure-bounds-static-cant-capture-borrowed.nll/closure-bounds-static-cant-capture-borrowed.nll.stderr
To only update this specific test, also pass `--test-args closures/closure-bounds-static-cant-capture-borrowed.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/closures/closure-bounds-static-cant-capture-borrowed.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Ccodegen-units=1" "-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/closures/closure-bounds-static-cant-capture-borrowed.nll" "-Zborrowck=mir" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/closures/closure-bounds-static-cant-capture-borrowed.nll/auxiliary"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
error[E0621]: explicit lifetime required in the type of `x`
   |
   |
LL |   fn foo(x: &()) {
   |             --- the type of `x` does not have lifetime `'static'`
LL | /     bar(|| {
LL | |         //~^ ERROR explicit lifetime required in the type of `x` [E0621]
LL | |         let _ = x;
LL | |     })
   | |______^ lifetime `'static` required

error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
   |
LL |     bar(|| {
LL |     bar(|| {
   |         ^^ may outlive borrowed value `x`
LL |         //~^ ERROR explicit lifetime required in the type of `x` [E0621]
LL |         let _ = x;
   |                 - `x` is borrowed here
   |
note: function requires argument type to outlive `'static`
   |
LL | /     bar(|| {
LL | /     bar(|| {
LL | |         //~^ ERROR explicit lifetime required in the type of `x` [E0621]
LL | |         let _ = x;
LL | |     })
   | |______^
help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
LL |     bar(move || {
   |         ++++

error: aborting due to 2 previous errors
---

---- [ui (nll)] ui/lifetimes/issue-90600-expected-return-static-indirect.rs stdout ----
diff of stderr:

+ error[E0597]: `foo` does not live long enough
+    |
+    |
+ LL |     let refcell = RefCell::new(&mut foo);
+    |                                ^^^^^^^^ borrowed value does not live long enough
+ LL |     let read = &refcell as &RefCell<dyn Read>;
+    |                -------- cast requires that `foo` is borrowed for `'static`
+ LL | }
+ LL | }
+    | - `foo` dropped here while still borrowed
1 error[E0621]: explicit lifetime required in the type of `foo`
-   --> $DIR/issue-90600-expected-return-static-indirect.rs:10:16
+   --> $DIR/issue-90600-expected-return-static-indirect.rs:8:16
3    |
3    |
4 LL | fn inner(mut foo: &[u8]) {
5    |                   ----- the type of `foo` does not have lifetime `'static'`
- ...
- ...
- LL |     read_thing(read);
-    |                ^^^^ lifetime `'static` required
+ LL |     let refcell = RefCell::new(&mut foo);
+ LL |     let read = &refcell as &RefCell<dyn Read>;
+    |                ^^^^^^^^ lifetime `'static` required
- error: aborting due to previous error
+ error: aborting due to 2 previous errors
11 
- For more information about this error, try `rustc --explain E0621`.
- For more information about this error, try `rustc --explain E0621`.
+ Some errors have detailed explanations: E0597, E0621.
+ For more information about an error, try `rustc --explain E0597`.
13 


The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/lifetimes/issue-90600-expected-return-static-indirect.nll/issue-90600-expected-return-static-indirect.nll.stderr
To only update this specific test, also pass `--test-args lifetimes/issue-90600-expected-return-static-indirect.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/lifetimes/issue-90600-expected-return-static-indirect.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Ccodegen-units=1" "-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/lifetimes/issue-90600-expected-return-static-indirect.nll" "-Zborrowck=mir" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/lifetimes/issue-90600-expected-return-static-indirect.nll/auxiliary"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
error[E0597]: `foo` does not live long enough
   |
   |
LL |     let refcell = RefCell::new(&mut foo);
   |                                ^^^^^^^^ borrowed value does not live long enough
LL |     let read = &refcell as &RefCell<dyn Read>;
   |                -------- cast requires that `foo` is borrowed for `'static`
LL | }
LL | }
   | - `foo` dropped here while still borrowed
error[E0621]: explicit lifetime required in the type of `foo`
  --> /checkout/src/test/ui/lifetimes/issue-90600-expected-return-static-indirect.rs:8:16
   |
   |
LL | fn inner(mut foo: &[u8]) {
   |                   ----- the type of `foo` does not have lifetime `'static'`
LL |     let refcell = RefCell::new(&mut foo);
LL |     let read = &refcell as &RefCell<dyn Read>;
   |                ^^^^^^^^ lifetime `'static` required
error: aborting due to 2 previous errors

Some errors have detailed explanations: E0597, E0621.
For more information about an error, try `rustc --explain E0597`.
---

9 error[E0621]: explicit lifetime required in the type of `u`
10   --> $DIR/regions-static-bound.rs:14:5
11    |
+ LL | fn error(u: &(), v: &()) {
+    |             --- the type of `u` does not have lifetime `'static'`
12 LL |     static_id(&u);
13    |     ^^^^^^^^^^^^^ lifetime `'static` required

15 error[E0621]: explicit lifetime required in the type of `v`
16   --> $DIR/regions-static-bound.rs:16:5
17    |
17    |
+ LL | fn error(u: &(), v: &()) {
+    |                     --- the type of `v` does not have lifetime `'static'`
+ ...
18 LL |     static_id_indirect(&v);
19    |     ^^^^^^^^^^^^^^^^^^^^^^ lifetime `'static` required


The actual stderr differed from the expected stderr.
The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/regions/regions-static-bound.migrate.nll/regions-static-bound.migrate.nll.stderr
To only update this specific test, also pass `--test-args regions/regions-static-bound.rs`


error in revision `migrate`: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/regions/regions-static-bound.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--cfg" "migrate" "--error-format" "json" "-Ccodegen-units=1" "-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/regions/regions-static-bound.migrate.nll" "-Zborrowck=mir" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/regions/regions-static-bound.migrate.nll/auxiliary"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
error: lifetime may not live long enough
  --> /checkout/src/test/ui/regions/regions-static-bound.rs:9:5
   |
LL | fn static_id_wrong_way<'a>(t: &'a ()) -> &'static () where 'static: 'a {
   |                        -- lifetime `'a` defined here
LL |     t //[migrate]~ ERROR E0312
   |     ^ returning this value requires that `'a` must outlive `'static`
error[E0621]: explicit lifetime required in the type of `u`
  --> /checkout/src/test/ui/regions/regions-static-bound.rs:14:5
   |
   |
LL | fn error(u: &(), v: &()) {
   |             --- the type of `u` does not have lifetime `'static'`
LL |     static_id(&u); //[migrate]~ ERROR explicit lifetime required in the type of `u` [E0621]
   |     ^^^^^^^^^^^^^ lifetime `'static` required
error[E0621]: explicit lifetime required in the type of `v`
  --> /checkout/src/test/ui/regions/regions-static-bound.rs:16:5
   |
   |
LL | fn error(u: &(), v: &()) {
   |                     --- the type of `v` does not have lifetime `'static'`
...
LL |     static_id_indirect(&v); //[migrate]~ ERROR explicit lifetime required in the type of `v` [E0621]
   |     ^^^^^^^^^^^^^^^^^^^^^^ lifetime `'static` required
error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0621`.

---
    [ui (nll)] ui/regions/regions-static-bound.rs#migrate

test result: FAILED. 12249 passed; 3 failed; 146 ignored; 0 measured; 0 filtered out; finished in 110.21s

Some tests failed in compiletest suite=ui compare_mode=Nll mode=ui host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu


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" "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--host-rustcflags" "-Crpath -Cdebuginfo=0  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -Cdebuginfo=0  -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" "--llvm-version" "13.0.0-rust-1.58.0-nightly" "--llvm-components" "aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets 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 cfguard codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker dwp engine executionengine extensions filecheck frontendopenacc frontendopenmp fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interfacestub interpreter ipo irreader jitlink libdriver lineeditor linker lto m68k m68kasmparser m68kcodegen m68kdesc m68kdisassembler m68kinfo 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 orcshared orctargetprocess passes powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo 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 webassemblyutils windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info xray" "--cc" "" "--cxx" "" "--cflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--channel" "nightly" "--color" "always" "--compare-mode" "nll"


Build completed unsuccessfully in 0:20:55

@matthiaskrgr matthiaskrgr deleted the rollup-ghzsxxa branch November 20, 2021 15:04
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.

9 participants