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 7 pull requests #91001

Closed
wants to merge 29 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

wooster0 and others added 29 commits November 1, 2021 18:52
Be more thorough in using `ItemObligation` and `BindingObligation` when
evaluating obligations so that we can point at trait bounds that
introduced unfulfilled obligations. We no longer incorrectly point at
unrelated trait bounds (`substs-ppaux.verbose.stderr`).

In particular, we now point at trait bounds on method calls.

We no longer point at "obvious" obligation sources (we no longer have a
note pointing at `Trait` saying "required by a bound in `Trait`", like
in `associated-types-no-suitable-supertrait*`).

Address part of rust-lang#89418.
`predicates_of` no longer changes when changing a trait's front matter
because we no longer include the trait's span in the identity trait
obligation.
Group obligations by `impl` block that introduced them.
…=nagisa

Point at source of trait bound obligations in more places

Be more thorough in using `ItemObligation` and `BindingObligation` when
evaluating obligations so that we can point at trait bounds that
introduced unfulfilled obligations. We no longer incorrectly point at
unrelated trait bounds (`substs-ppaux.verbose.stderr`).

In particular, we now point at trait bounds on method calls.

We no longer point at "obvious" obligation sources (we no longer have a
note pointing at `Trait` saying "required by a bound in `Trait`", like
in `associated-types-no-suitable-supertrait*`).

We no longer point at associated items (`ImplObligation`), as they didn't
add any user actionable information, they just added noise.

Address part of rust-lang#89418.
…=Aaron1011

Add `-Zassert-incr-state` to assert state of incremental cache

Closes rust-lang#85864.
Mention `Vec::remove` in `Vec::swap_remove`'s docs

Thought this was a nice addition.
add const generics test

cc rust-lang#89829 (comment)

r? rust-lang/project-const-generics
windows: Return the "Not Found" error when a path is empty

Fixes rust-lang#90940
…loat-ending-in-dot, r=sanxiyn

Avoid suggesting literal formatting that turns into member access

Fixes rust-lang#90974
@rustbot rustbot added the rollup A PR which is a rollup label Nov 18, 2021
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=7

@bors
Copy link
Contributor

bors commented Nov 18, 2021

📌 Commit 177058c 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 18, 2021
@bors
Copy link
Contributor

bors commented Nov 18, 2021

⌛ Testing commit 177058c with merge da405e16cd3d3c4cd2802c38fc859b96ebc5ad90...

@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/const-generics/invariant.rs stdout ----
diff of stderr:

18 LL |     v
19    |     ^ one type is more general than the other
20    |
-    = note: expected reference `&'static Foo<fn(&'static ())>`
-               found reference `&'static Foo<for<'a> fn(&'a ())>`
+    = note: expected reference `&Foo<fn(&())>`
+               found reference `&Foo<for<'a> fn(&'a ())>`
24 error: aborting due to previous error; 1 warning emitted
25 



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/invariant.nll/invariant.nll.stderr
To only update this specific test, also pass `--test-args const-generics/invariant.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/const-generics/invariant.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/const-generics/invariant.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/const-generics/invariant.nll/auxiliary"
Some tests failed in compiletest suite=ui compare_mode=Nll mode=ui host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
warning: conflicting implementations of trait `SadBee` for type `for<'a> fn(&'a ())`
   |
   |
LL | impl SadBee for for<'a> fn(&'a ()) {
   | ---------------------------------- first implementation here
...
LL | impl SadBee for fn(&'static ()) {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `for<'a> fn(&'a ())`
   |
   = note: `#[warn(coherence_leak_check)]` on by default
   = note: for more information, see issue #56105 <https://github.com/rust-lang/rust/issues/56105>
   = note: for more information, see issue #56105 <https://github.com/rust-lang/rust/issues/56105>
   = note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
error[E0308]: mismatched types
  --> /checkout/src/test/ui/const-generics/invariant.rs:27:5
   |
   |
LL |     v //~ ERROR mismatched types
   |     ^ one type is more general than the other
   |
   = note: expected reference `&Foo<fn(&())>`
              found reference `&Foo<for<'a> fn(&'a ())>`
error: aborting due to previous error; 1 warning emitted

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


------------------------------------------


---- [ui (nll)] ui/mismatched_types/closure-arg-type-mismatch.rs stdout ----
diff of stderr:

5    |              ^^^ ------------------ found signature of `fn((u32, u32)) -> _`
6    |              |
7    |              expected signature of `fn(&(u32, u32)) -> _`
+ note: required by a bound in `map`
+   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+    |
+    |
+ LL |         F: FnMut(Self::Item) -> B,
+    |            ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map`
9 error[E0631]: type mismatch in closure arguments
10   --> $DIR/closure-arg-type-mismatch.rs:4:14


13    |              ^^^ ------------------- found signature of `for<'r> fn(&'r (u16, u16)) -> _`
14    |              |
15    |              expected signature of `fn(&(u32, u32)) -> _`
+ note: required by a bound in `map`
+   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+    |
+    |
+ LL |         F: FnMut(Self::Item) -> B,
+    |            ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map`
17 error[E0631]: type mismatch in closure arguments
18   --> $DIR/closure-arg-type-mismatch.rs:5:14


21    |              ^^^ ------------------ found signature of `fn((u16, u16)) -> _`
22    |              |
23    |              expected signature of `fn(&(u32, u32)) -> _`
+ note: required by a bound in `map`
+   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+    |
+    |
+ LL |         F: FnMut(Self::Item) -> B,
+    |            ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map`
25 error: aborting due to 3 previous errors
26 



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/mismatched_types/closure-arg-type-mismatch.nll/closure-arg-type-mismatch.nll.stderr
To only update this specific test, also pass `--test-args mismatched_types/closure-arg-type-mismatch.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/mismatched_types/closure-arg-type-mismatch.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/mismatched_types/closure-arg-type-mismatch.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/mismatched_types/closure-arg-type-mismatch.nll/auxiliary"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
error[E0631]: type mismatch in closure arguments
  --> /checkout/src/test/ui/mismatched_types/closure-arg-type-mismatch.rs:3:14
   |
LL |     a.iter().map(|_: (u32, u32)| 45); //~ ERROR type mismatch
   |              ^^^ ------------------ found signature of `fn((u32, u32)) -> _`
   |              |
   |              expected signature of `fn(&(u32, u32)) -> _`
note: required by a bound in `map`
  --> /checkout/library/core/src/iter/traits/iterator.rs:685:12
   |
   |
LL |         F: FnMut(Self::Item) -> B,
   |            ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map`
error[E0631]: type mismatch in closure arguments
  --> /checkout/src/test/ui/mismatched_types/closure-arg-type-mismatch.rs:4:14
   |
   |
LL |     a.iter().map(|_: &(u16, u16)| 45); //~ ERROR type mismatch
   |              ^^^ ------------------- found signature of `for<'r> fn(&'r (u16, u16)) -> _`
   |              |
   |              expected signature of `fn(&(u32, u32)) -> _`
note: required by a bound in `map`
  --> /checkout/library/core/src/iter/traits/iterator.rs:685:12
   |
   |
LL |         F: FnMut(Self::Item) -> B,
   |            ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map`
error[E0631]: type mismatch in closure arguments
  --> /checkout/src/test/ui/mismatched_types/closure-arg-type-mismatch.rs:5:14
   |
   |
LL |     a.iter().map(|_: (u16, u16)| 45); //~ ERROR type mismatch
   |              ^^^ ------------------ found signature of `fn((u16, u16)) -> _`
   |              |
   |              expected signature of `fn(&(u32, u32)) -> _`
note: required by a bound in `map`
  --> /checkout/library/core/src/iter/traits/iterator.rs:685:12
   |
   |
LL |         F: FnMut(Self::Item) -> B,
   |            ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map`
error: aborting due to 3 previous errors

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

---
test result: FAILED. 12244 passed; 2 failed; 146 ignored; 0 measured; 0 filtered out; finished in 116.39s



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:08

@bors
Copy link
Contributor

bors commented Nov 18, 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 18, 2021
@matthiaskrgr matthiaskrgr deleted the rollup-9qyx0x1 branch November 20, 2021 15:03
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.