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

Clean create_substs_for_generic_args #80827

Closed
wants to merge 1 commit into from

Conversation

JulianKnodt
Copy link
Contributor

Moves large error case to separate function, and recompute force_infer_lt when that case is hit rather than keeping track of it through all loops.

Hopefully this fixes the perf regression caused from an earlier PR.

@rust-highfive
Copy link
Collaborator

r? @varkor

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 8, 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)
......................................ii............................................................ 7600/11245
...........................................................i........................................ 7700/11245
............................................i....................................................... 7800/11245
...................................i................................................................ 7900/11245
.......................F..F......................................................................... 8000/11245
.................................................................................................... 8200/11245
.................................................................................................i.. 8300/11245
.................................................................................................... 8400/11245
.................................................................................................... 8500/11245
---
.................................................................................................... 9000/11245
.................................................................................................... 9100/11245
.................................................................................................... 9200/11245
.........................................i......i................................................... 9300/11245
.................................................................................iiiiii....iiiiiii.. 9400/11245
.................................................................................................... 9600/11245
.................................................................................................... 9700/11245
.................................................................................................... 9800/11245
.................................................................................................... 9900/11245
---
failures:

---- [ui] ui/parser/issue-14303-path.rs stdout ----

error: Error: expected failure status (Some(1)) but received status Some(101).
status: exit code: 101
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/parser/issue-14303-path.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/parser/issue-14303-path" "-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/parser/issue-14303-path/auxiliary"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
thread 'rustc' panicked at 'lifetimes ought to have been inferred', compiler/rustc_typeck/src/astconv/generics.rs:289:48

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.
note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.51.0-nightly (e365f626f 2021-01-08) running on x86_64-unknown-linux-gnu


note: compiler flags: -Z threads=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z emit-future-incompat-report -Z unstable-options -C prefer-dynamic -C rpath -C debuginfo=0
query stack during panic:
query stack during panic:
#0 [fn_sig] computing function signature of `bar`
#1 [collect_mod_item_types] collecting item types in top-level module
end of query stack
------------------------------------------


---- [ui] ui/parser/issue-14303-fncall.rs stdout ----
---- [ui] ui/parser/issue-14303-fncall.rs stdout ----

error: Error: expected failure status (Some(1)) but received status Some(101).
status: exit code: 101
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/parser/issue-14303-fncall.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/parser/issue-14303-fncall" "-A" "unused" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zborrowck=mir" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/parser/issue-14303-fncall/auxiliary"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
thread 'rustc' panicked at 'lifetimes ought to have been inferred', compiler/rustc_typeck/src/astconv/generics.rs:289:48

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.
note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.51.0-nightly (e365f626f 2021-01-08) running on x86_64-unknown-linux-gnu


note: compiler flags: -Z threads=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z emit-future-incompat-report -Z unstable-options -Z borrowck=mir -C prefer-dynamic -C rpath -C debuginfo=0
query stack during panic:
query stack during panic:
#0 [typeck] type-checking `foo`
#1 [typeck_item_bodies] type-checking all item bodies
end of query stack
------------------------------------------


---- [ui] ui/suggestions/suggest-move-types.rs stdout ----
---- [ui] ui/suggestions/suggest-move-types.rs stdout ----

error: Error: expected failure status (Some(1)) but received status Some(101).
status: exit code: 101
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/suggestions/suggest-move-types.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/suggestions/suggest-move-types" "-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/suggestions/suggest-move-types/auxiliary"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
error: generic arguments must come before the first constraint
   |
   |
LL | struct A<T, M: One<A=(), T>> {
   |                    ----  ^ generic argument
   |                    constraint
   |
   |
help: move the constraint after the generic argument
   |
LL | struct A<T, M: One<T, A = ()>> {


error: generic arguments must come before the first constraint
   |
   |
LL | struct Al<'a, T, M: OneWithLifetime<A=(), T, 'a>> {
   |                                     ----  ^  ^^ generic arguments
   |                                     constraint
   |
   |
help: move the constraint after the generic arguments
   |
LL | struct Al<'a, T, M: OneWithLifetime<'a, T, A = ()>> {


error: generic arguments must come before the first constraint
   |
   |
LL | struct B<T, U, V, M: Three<A=(), B=(), C=(), T, U, V>> {
   |                            ----  ----  ----  ^  ^  ^ generic arguments
   |                            constraints
   |
Some tests failed in compiletest suite=ui mode=ui host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
Some tests failed in compiletest suite=ui mode=ui host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
help: move the constraints after the generic arguments
   |
LL | struct B<T, U, V, M: Three<T, U, V, A = (), B = (), C = ()>> {


error: generic arguments must come before the first constraint
   |
   |
LL | struct Bl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<A=(), B=(), C=(), T, U, V, 'a, 'b, 'c>> {
   |                                                     ----  ----  ----  ^  ^  ^  ^^  ^^  ^^ generic arguments
   |                                                     constraints
   |
   |
help: move the constraints after the generic arguments
   |
LL | struct Bl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<'a, 'b, 'c, T, U, V, A = (), B = (), C = ()>> {


error: generic arguments must come before the first constraint
   |
   |
LL | struct C<T, U, V, M: Three<T, A=(), B=(), C=(), U, V>> {
   |                            ^  ----  ----  ----  ^  ^ generic arguments
   |                               constraints
   |
   |
help: move the constraints after the generic arguments
   |
LL | struct C<T, U, V, M: Three<T, U, V, A = (), B = (), C = ()>> {


error: generic arguments must come before the first constraint
   |
   |
LL | struct Cl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<T, 'a, A=(), B=(), C=(), U, 'b, V, 'c>> {
   |                                                     ^  ^^  ----  ----  ----  ^  ^^  ^  ^^ generic arguments
   |                                                            constraints
   |
   |
help: move the constraints after the generic arguments
   |
LL | struct Cl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<'a, 'b, 'c, T, U, V, A = (), B = (), C = ()>> {


error: generic arguments must come before the first constraint
   |
   |
LL | struct D<T, U, V, M: Three<T, A=(), B=(), U, C=(), V>> {
   |                            ^  ----  ----  ^  ----  ^ generic arguments
   |                               constraints
   |
   |
help: move the constraints after the generic arguments
   |
LL | struct D<T, U, V, M: Three<T, U, V, A = (), B = (), C = ()>> {


error: generic arguments must come before the first constraint
   |
   |
LL | struct Dl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<T, 'a, A=(), B=(), U, 'b, C=(), V, 'c>> {
   |                                                     ^  ^^  ----  ----  ^  ^^  ----  ^  ^^ generic arguments
   |                                                            constraints
   |
   |
help: move the constraints after the generic arguments
   |
LL | struct Dl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<'a, 'b, 'c, T, U, V, A = (), B = (), C = ()>> {


thread 'rustc' panicked at 'lifetimes ought to have been inferred', compiler/rustc_typeck/src/astconv/generics.rs:289:48

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.
note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.51.0-nightly (e365f626f 2021-01-08) running on x86_64-unknown-linux-gnu


note: compiler flags: -Z threads=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z emit-future-incompat-report -Z unstable-options -C prefer-dynamic -C rpath -C debuginfo=0
query stack during panic:
query stack during panic:
#0 [explicit_predicates_of] computing explicit predicates of `Al`
#1 [predicates_defined_on] computing predicates of `Al`
end of query stack


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



---- [ui] ui/traits/trait-object-vs-lifetime.rs stdout ----

error: Error: expected failure status (Some(1)) but received status Some(101).
status: exit code: 101
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/traits/trait-object-vs-lifetime.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/traits/trait-object-vs-lifetime" "-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/traits/trait-object-vs-lifetime/auxiliary"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
error[E0224]: at least one trait is required for an object type
   |
   |
LL |     let _: S<'static, dyn 'static +>;


error[E0107]: wrong number of lifetime arguments: expected 1, found 2
   |
   |
LL |     let _: S<'static, 'static>;
   |                       ^^^^^^^ unexpected lifetime argument

error[E0107]: wrong number of type arguments: expected 1, found 0
   |
   |
LL |     let _: S<'static, 'static>;
   |            ^^^^^^^^^^^^^^^^^^^ expected 1 type argument

error[E0224]: at least one trait is required for an object type
   |
   |
LL |     let _: S<dyn 'static +, 'static>;


thread 'rustc' panicked at 'lifetimes ought to have been inferred', compiler/rustc_typeck/src/astconv/generics.rs:289:48

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.
note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.51.0-nightly (e365f626f 2021-01-08) running on x86_64-unknown-linux-gnu


note: compiler flags: -Z threads=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z emit-future-incompat-report -Z unstable-options -C prefer-dynamic -C rpath -C debuginfo=0
query stack during panic:
query stack during panic:
#0 [typeck] type-checking `main`
#1 [typeck_item_bodies] type-checking all item bodies
end of query stack

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

---
test result: FAILED. 11155 passed; 4 failed; 86 ignored; 0 measured; 0 filtered out; finished in 135.17s



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/python2.7" "--lldb-python" "/usr/bin/python2.7" "--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:15:04

@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)
.................................................................................................... 9000/11245
.................................................................................................... 9100/11245
.................................................................................................... 9200/11245
.........................................i......i................................................... 9300/11245
................................................................................iiiiii..iiiiii.i.... 9400/11245
.................................................................................................... 9600/11245
.................................................................................................... 9700/11245
.................................................................................................... 9800/11245
.................................................................................................... 9900/11245
---
diff of stderr:

109    |                                           ^
110 
111 error[E0747]: type provided when a lifetime was expected
-   --> $DIR/suggest-move-types.rs:48:71
+   --> $DIR/suggest-move-types.rs:48:77
113    |
114 LL | struct Bl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<A=(), B=(), C=(), T, U, V, 'a, 'b, 'c>> {
+    |                                                                             ^
116 
116 
117 error[E0747]: lifetime provided when a type was expected
118   --> $DIR/suggest-move-types.rs:65:56

The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/suggestions/suggest-move-types/suggest-move-types.stderr
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/suggestions/suggest-move-types/suggest-move-types.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args suggestions/suggest-move-types.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/suggestions/suggest-move-types.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/suggestions/suggest-move-types" "-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/suggestions/suggest-move-types/auxiliary"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
error: generic arguments must come before the first constraint
   |
   |
LL | struct A<T, M: One<A=(), T>> {
   |                    ----  ^ generic argument
   |                    constraint
   |
   |
help: move the constraint after the generic argument
   |
LL | struct A<T, M: One<T, A = ()>> {


error: generic arguments must come before the first constraint
   |
   |
LL | struct Al<'a, T, M: OneWithLifetime<A=(), T, 'a>> {
   |                                     ----  ^  ^^ generic arguments
   |                                     constraint
   |
   |
help: move the constraint after the generic arguments
   |
LL | struct Al<'a, T, M: OneWithLifetime<'a, T, A = ()>> {


error: generic arguments must come before the first constraint
   |
   |
LL | struct B<T, U, V, M: Three<A=(), B=(), C=(), T, U, V>> {
   |                            ----  ----  ----  ^  ^  ^ generic arguments
   |                            constraints
   |
   |
help: move the constraints after the generic arguments
   |
LL | struct B<T, U, V, M: Three<T, U, V, A = (), B = (), C = ()>> {


error: generic arguments must come before the first constraint
   |
   |
LL | struct Bl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<A=(), B=(), C=(), T, U, V, 'a, 'b, 'c>> {
   |                                                     ----  ----  ----  ^  ^  ^  ^^  ^^  ^^ generic arguments
   |                                                     constraints
   |
   |
help: move the constraints after the generic arguments
   |
LL | struct Bl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<'a, 'b, 'c, T, U, V, A = (), B = (), C = ()>> {


error: generic arguments must come before the first constraint
   |
   |
LL | struct C<T, U, V, M: Three<T, A=(), B=(), C=(), U, V>> {
   |                            ^  ----  ----  ----  ^  ^ generic arguments
   |                               constraints
   |
   |
help: move the constraints after the generic arguments
   |
LL | struct C<T, U, V, M: Three<T, U, V, A = (), B = (), C = ()>> {


error: generic arguments must come before the first constraint
   |
   |
LL | struct Cl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<T, 'a, A=(), B=(), C=(), U, 'b, V, 'c>> {
   |                                                     ^  ^^  ----  ----  ----  ^  ^^  ^  ^^ generic arguments
   |                                                            constraints
   |
   |
help: move the constraints after the generic arguments
   |
LL | struct Cl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<'a, 'b, 'c, T, U, V, A = (), B = (), C = ()>> {


error: generic arguments must come before the first constraint
   |
   |
LL | struct D<T, U, V, M: Three<T, A=(), B=(), U, C=(), V>> {
   |                            ^  ----  ----  ^  ----  ^ generic arguments
   |                               constraints
   |
   |
help: move the constraints after the generic arguments
   |
LL | struct D<T, U, V, M: Three<T, U, V, A = (), B = (), C = ()>> {


error: generic arguments must come before the first constraint
   |
   |
LL | struct Dl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<T, 'a, A=(), B=(), U, 'b, C=(), V, 'c>> {
   |                                                     ^  ^^  ----  ----  ^  ^^  ----  ^  ^^ generic arguments
   |                                                            constraints
   |
   |
help: move the constraints after the generic arguments
   |
LL | struct Dl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<'a, 'b, 'c, T, U, V, A = (), B = (), C = ()>> {


error[E0747]: type provided when a lifetime was expected
   |
   |
LL | struct Al<'a, T, M: OneWithLifetime<A=(), T, 'a>> {


error[E0747]: type provided when a lifetime was expected
   |
   |
LL | struct Bl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<A=(), B=(), C=(), T, U, V, 'a, 'b, 'c>> {


error[E0747]: lifetime provided when a type was expected
   |
   |
LL | struct Cl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<T, 'a, A=(), B=(), C=(), U, 'b, V, 'c>> {
   |
   |
   = note: lifetime arguments must be provided before type arguments
   = help: reorder the arguments: lifetimes, then types: `<'a, 'b, 'c, T, U, V>`

error[E0747]: lifetime provided when a type was expected
   |
   |
LL | struct Dl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<T, 'a, A=(), B=(), U, 'b, C=(), V, 'c>> {
   |
   |
   = note: lifetime arguments must be provided before type arguments
   = help: reorder the arguments: lifetimes, then types: `<'a, 'b, 'c, T, U, V>`
error: aborting due to 12 previous errors

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

---
test result: FAILED. 11158 passed; 1 failed; 86 ignored; 0 measured; 0 filtered out; finished in 138.71s



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/python2.7" "--lldb-python" "/usr/bin/python2.7" "--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:16:25

@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)
......................................ii............................................................ 7600/11245
...........................................................i........................................ 7700/11245
............................................i....................................................... 7800/11245
...................................i................................................................ 7900/11245
.......................F...F........................................................................ 8000/11245
.................................................................................................... 8200/11245
.................................................................................................i.. 8300/11245
.................................................................................................... 8400/11245
.................................................................................................... 8500/11245
---
.................................................................................................... 9000/11245
.................................................................................................... 9100/11245
.................................................................................................... 9200/11245
.........................................i......i................................................... 9300/11245
................................................................................iiiiii..iiiiii.i.... 9400/11245
.................................................................................................... 9600/11245
.................................................................................................... 9700/11245
.................................................................................................... 9800/11245
.................................................................................................... 9900/11245
---
failures:

---- [ui] ui/parser/issue-14303-fncall.rs stdout ----

error: Error: expected failure status (Some(1)) but received status Some(101).
status: exit code: 101
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/parser/issue-14303-fncall.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/parser/issue-14303-fncall" "-A" "unused" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zborrowck=mir" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/parser/issue-14303-fncall/auxiliary"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
thread 'rustc' panicked at 'lifetimes ought to have been inferred', compiler/rustc_typeck/src/astconv/generics.rs:291:48

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.
note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.51.0-nightly (e0ecd6c5b 2021-01-08) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z threads=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z emit-future-incompat-report -Z unstable-options -Z borrowck=mir -C prefer-dynamic -C rpath -C debuginfo=0
query stack during panic:
query stack during panic:
#0 [typeck] type-checking `foo`
#1 [typeck_item_bodies] type-checking all item bodies
end of query stack
------------------------------------------


---- [ui] ui/parser/issue-14303-path.rs stdout ----
---- [ui] ui/parser/issue-14303-path.rs stdout ----

error: Error: expected failure status (Some(1)) but received status Some(101).
status: exit code: 101
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/parser/issue-14303-path.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/parser/issue-14303-path" "-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/parser/issue-14303-path/auxiliary"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
thread 'rustc' panicked at 'lifetimes ought to have been inferred', compiler/rustc_typeck/src/astconv/generics.rs:291:48

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.
note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.51.0-nightly (e0ecd6c5b 2021-01-08) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z threads=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z emit-future-incompat-report -Z unstable-options -C prefer-dynamic -C rpath -C debuginfo=0
query stack during panic:
query stack during panic:
#0 [fn_sig] computing function signature of `bar`
#1 [collect_mod_item_types] collecting item types in top-level module
end of query stack
------------------------------------------


---- [ui] ui/suggestions/suggest-move-types.rs stdout ----
---- [ui] ui/suggestions/suggest-move-types.rs stdout ----

error: Error: expected failure status (Some(1)) but received status Some(101).
status: exit code: 101
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/suggestions/suggest-move-types.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/suggestions/suggest-move-types" "-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/suggestions/suggest-move-types/auxiliary"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
error: generic arguments must come before the first constraint
   |
   |
LL | struct A<T, M: One<A=(), T>> {
   |                    ----  ^ generic argument
   |                    constraint
   |
   |
help: move the constraint after the generic argument
   |
LL | struct A<T, M: One<T, A = ()>> {


error: generic arguments must come before the first constraint
   |
   |
LL | struct Al<'a, T, M: OneWithLifetime<A=(), T, 'a>> {
   |                                     ----  ^  ^^ generic arguments
   |                                     constraint
   |
   |
help: move the constraint after the generic arguments
   |
LL | struct Al<'a, T, M: OneWithLifetime<'a, T, A = ()>> {


error: generic arguments must come before the first constraint
Some tests failed in compiletest suite=ui mode=ui host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
   |
   |
LL | struct B<T, U, V, M: Three<A=(), B=(), C=(), T, U, V>> {
   |                            ----  ----  ----  ^  ^  ^ generic arguments
   |                            constraints
   |
   |
help: move the constraints after the generic arguments
   |
LL | struct B<T, U, V, M: Three<T, U, V, A = (), B = (), C = ()>> {


error: generic arguments must come before the first constraint
   |
   |
LL | struct Bl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<A=(), B=(), C=(), T, U, V, 'a, 'b, 'c>> {
   |                                                     ----  ----  ----  ^  ^  ^  ^^  ^^  ^^ generic arguments
   |                                                     constraints
   |
   |
help: move the constraints after the generic arguments
   |
LL | struct Bl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<'a, 'b, 'c, T, U, V, A = (), B = (), C = ()>> {


error: generic arguments must come before the first constraint
   |
   |
LL | struct C<T, U, V, M: Three<T, A=(), B=(), C=(), U, V>> {
   |                            ^  ----  ----  ----  ^  ^ generic arguments
   |                               constraints
   |
   |
help: move the constraints after the generic arguments
   |
LL | struct C<T, U, V, M: Three<T, U, V, A = (), B = (), C = ()>> {


error: generic arguments must come before the first constraint
   |
   |
LL | struct Cl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<T, 'a, A=(), B=(), C=(), U, 'b, V, 'c>> {
   |                                                     ^  ^^  ----  ----  ----  ^  ^^  ^  ^^ generic arguments
   |                                                            constraints
   |
   |
help: move the constraints after the generic arguments
   |
LL | struct Cl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<'a, 'b, 'c, T, U, V, A = (), B = (), C = ()>> {


error: generic arguments must come before the first constraint
   |
   |
LL | struct D<T, U, V, M: Three<T, A=(), B=(), U, C=(), V>> {
   |                            ^  ----  ----  ^  ----  ^ generic arguments
   |                               constraints
   |
   |
help: move the constraints after the generic arguments
   |
LL | struct D<T, U, V, M: Three<T, U, V, A = (), B = (), C = ()>> {


error: generic arguments must come before the first constraint
   |
   |
LL | struct Dl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<T, 'a, A=(), B=(), U, 'b, C=(), V, 'c>> {
   |                                                     ^  ^^  ----  ----  ^  ^^  ----  ^  ^^ generic arguments
   |                                                            constraints
   |
   |
help: move the constraints after the generic arguments
   |
LL | struct Dl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<'a, 'b, 'c, T, U, V, A = (), B = (), C = ()>> {


thread 'rustc' panicked at 'lifetimes ought to have been inferred', compiler/rustc_typeck/src/astconv/generics.rs:291:48

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.
note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.51.0-nightly (e0ecd6c5b 2021-01-08) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z threads=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z emit-future-incompat-report -Z unstable-options -C prefer-dynamic -C rpath -C debuginfo=0
query stack during panic:
query stack during panic:
#0 [explicit_predicates_of] computing explicit predicates of `Al`
#1 [predicates_defined_on] computing predicates of `Al`
end of query stack


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



---- [ui] ui/traits/trait-object-vs-lifetime.rs stdout ----

error: Error: expected failure status (Some(1)) but received status Some(101).
status: exit code: 101
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/traits/trait-object-vs-lifetime.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/traits/trait-object-vs-lifetime" "-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/traits/trait-object-vs-lifetime/auxiliary"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
error[E0224]: at least one trait is required for an object type
   |
   |
LL |     let _: S<'static, dyn 'static +>;


error[E0107]: wrong number of lifetime arguments: expected 1, found 2
   |
   |
LL |     let _: S<'static, 'static>;
   |                       ^^^^^^^ unexpected lifetime argument

error[E0107]: wrong number of type arguments: expected 1, found 0
   |
   |
LL |     let _: S<'static, 'static>;
   |            ^^^^^^^^^^^^^^^^^^^ expected 1 type argument

error[E0224]: at least one trait is required for an object type
   |
   |
LL |     let _: S<dyn 'static +, 'static>;


thread 'rustc' panicked at 'lifetimes ought to have been inferred', compiler/rustc_typeck/src/astconv/generics.rs:291:48

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.
note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.51.0-nightly (e0ecd6c5b 2021-01-08) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z threads=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z emit-future-incompat-report -Z unstable-options -C prefer-dynamic -C rpath -C debuginfo=0
query stack during panic:
query stack during panic:
#0 [typeck] type-checking `main`
#1 [typeck_item_bodies] type-checking all item bodies
end of query stack

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

---
test result: FAILED. 11155 passed; 4 failed; 86 ignored; 0 measured; 0 filtered out; finished in 139.48s



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/python2.7" "--lldb-python" "/usr/bin/python2.7" "--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:16:01

@JulianKnodt JulianKnodt force-pushed the gen_arg_ref branch 2 times, most recently from ae60adb to cb125e5 Compare January 9, 2021 00:41
@rust-log-analyzer
Copy link
Collaborator

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
    Checking rustc_mir_build v0.0.0 (/checkout/compiler/rustc_mir_build)
    Checking rustc_ty_utils v0.0.0 (/checkout/compiler/rustc_ty_utils)
    Checking rustc_mir v0.0.0 (/checkout/compiler/rustc_mir)
    Checking rustc_traits v0.0.0 (/checkout/compiler/rustc_traits)
error: expected one of `.`, `;`, `?`, `}`, or an operator, found keyword `for`
   --> compiler/rustc_typeck/src/astconv/generics.rs:326:25
    |
325 |                         substs.reserve(params.len())
    |                                                     - expected one of `.`, `;`, `?`, `}`, or an operator
326 |                         for p in params {

    Checking rustc_plugin_impl v0.0.0 (/checkout/compiler/rustc_plugin_impl)
error: aborting due to previous error


error: could not compile `rustc_typeck`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "check" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "16" "--release" "--color" "always" "--features" " llvm max_level_info" "--manifest-path" "/checkout/compiler/rustc/Cargo.toml" "-p" "rustc-main" "-p" "rustc_codegen_ssa" "-p" "rustc_data_structures" "-p" "rustc_graphviz" "-p" "rustc_session" "-p" "rustc_lint_defs" "-p" "rustc_feature" "-p" "rustc_span" "-p" "rustc_arena" "-p" "rustc_symbol_mangling" "-p" "rustc_target" "-p" "rustc_hir" "-p" "rustc_serialize" "-p" "rustc_errors" "-p" "rustc_macros" "-p" "rustc_index" "-p" "rustc_incremental" "-p" "rustc_attr" "-p" "rustc_lexer" "-p" "rustc_ast_pretty" "-p" "rustc_fs_util" "-p" "rustc_apfloat" "-p" "rustc_ast" "-p" "rustc_middle" "-p" "rustc_query_system" "-p" "rustc_type_ir" "-p" "rustc_driver" "-p" "rustc_metadata" "-p" "rustc_expand" "-p" "rustc_ast_passes" "-p" "rustc_error_codes" "-p" "rustc_parse" "-p" "rustc_plugin_impl" "-p" "rustc_lint" "-p" "rustc_parse_format" "-p" "rustc_trait_selection" "-p" "rustc_infer" "-p" "rustc_save_analysis" "-p" "rustc_interface" "-p" "rustc_privacy" "-p" "rustc_typeck" "-p" "rustc_passes" "-p" "rustc_mir_build" "-p" "rustc_builtin_macros" "-p" "rustc_resolve" "-p" "rustc_traits" "-p" "rustc_ast_lowering" "-p" "rustc_codegen_llvm" "-p" "rustc_llvm" "-p" "rustc_ty_utils" "-p" "rustc_mir" "-p" "coverage_test_macros" "-p" "rustc_hir_pretty" "--message-format" "json-render-diagnostics"
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap check
Build completed unsuccessfully in 0:02:32

@rust-log-analyzer
Copy link
Collaborator

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
    Checking rustc_plugin_impl v0.0.0 (/checkout/compiler/rustc_plugin_impl)
error: unused variable: `p`
   --> compiler/rustc_typeck/src/astconv/generics.rs:326:29
    |
326 |                         for p in params {
    |                             ^ help: if this is intentional, prefix it with an underscore: `_p`
    |
    = note: `-D unused-variables` implied by `-D warnings`
error: aborting due to previous error

error: could not compile `rustc_typeck`


To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "check" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "16" "--release" "--color" "always" "--features" " llvm max_level_info" "--manifest-path" "/checkout/compiler/rustc/Cargo.toml" "-p" "rustc-main" "-p" "rustc_driver" "-p" "rustc_serialize" "-p" "rustc_macros" "-p" "rustc_mir" "-p" "rustc_apfloat" "-p" "rustc_infer" "-p" "rustc_lexer" "-p" "rustc_index" "-p" "rustc_graphviz" "-p" "rustc_attr" "-p" "coverage_test_macros" "-p" "rustc_trait_selection" "-p" "rustc_parse_format" "-p" "rustc_interface" "-p" "rustc_incremental" "-p" "rustc_fs_util" "-p" "rustc_passes" "-p" "rustc_symbol_mangling" "-p" "rustc_resolve" "-p" "rustc_arena" "-p" "rustc_typeck" "-p" "rustc_ty_utils" "-p" "rustc_traits" "-p" "rustc_mir_build" "-p" "rustc_ast_lowering" "-p" "rustc_codegen_llvm" "-p" "rustc_llvm" "-p" "rustc_expand" "-p" "rustc_privacy" "-p" "rustc_ast_passes" "-p" "rustc_builtin_macros" "-p" "rustc_middle" "-p" "rustc_query_system" "-p" "rustc_type_ir" "-p" "rustc_hir" "-p" "rustc_target" "-p" "rustc_span" "-p" "rustc_data_structures" "-p" "rustc_session" "-p" "rustc_lint_defs" "-p" "rustc_plugin_impl" "-p" "rustc_save_analysis" "-p" "rustc_errors" "-p" "rustc_feature" "-p" "rustc_metadata" "-p" "rustc_hir_pretty" "-p" "rustc_error_codes" "-p" "rustc_lint" "-p" "rustc_ast" "-p" "rustc_parse" "-p" "rustc_ast_pretty" "-p" "rustc_codegen_ssa" "--message-format" "json-render-diagnostics"
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap check
Build completed unsuccessfully in 0:02:54

@rust-log-analyzer
Copy link
Collaborator

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
configure: rust.channel         := nightly
configure: rust.debug-assertions := True
configure: llvm.assertions      := True
configure: dist.missing-tools   := True
configure: build.configure-args := ['--enable-sccache', '--disable-manage-submodu ...
configure: writing `config.toml` in current directory
configure: 
configure: run `python /checkout/x.py --help`
configure: 
---
skip untracked path cpu-usage.csv during rustfmt invocations
skip untracked path src/doc/book/ during rustfmt invocations
skip untracked path src/doc/rust-by-example/ during rustfmt invocations
skip untracked path src/llvm-project/ during rustfmt invocations
Diff in /checkout/compiler/rustc_typeck/src/astconv/generics.rs at line 324:
Running `"/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustfmt" "--config-path" "/checkout" "--edition" "2018" "--unstable-features" "--skip-children" "--check" "/checkout/compiler/rustc_typeck/src/astconv/generics.rs"` failed.
If you're running `tidy`, try again with `--bless`. Or, if you just want to format code, run `./x.py fmt` instead.
                         params.next();
                         substs.reserve(params.len());
                         for p in params {
-                          substs.push(ctx.inferred_kind(Some(&substs), p, infer_args));
+                            substs.push(ctx.inferred_kind(Some(&substs), p, infer_args));
                         break;
                     }
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --stage 2 src/tools/tidy
Build completed unsuccessfully in 0:00:14

@JulianKnodt JulianKnodt force-pushed the gen_arg_ref branch 5 times, most recently from 298ac11 to ffde65c Compare January 9, 2021 05:21
@lcnr
Copy link
Contributor

lcnr commented Jan 9, 2021

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@bors
Copy link
Contributor

bors commented Jan 9, 2021

⌛ Trying commit c780fe4 with merge a767935a5a42bfdac439f8d8fbec1ecdcdf8dcfb...

@bors
Copy link
Contributor

bors commented Jan 9, 2021

☀️ Try build successful - checks-actions
Build commit: a767935a5a42bfdac439f8d8fbec1ecdcdf8dcfb (a767935a5a42bfdac439f8d8fbec1ecdcdf8dcfb)

@rust-timer
Copy link
Collaborator

Queued a767935a5a42bfdac439f8d8fbec1ecdcdf8dcfb with parent c87ef0a, future comparison URL.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 9, 2021
@rust-timer
Copy link
Collaborator

Finished benchmarking try commit (a767935a5a42bfdac439f8d8fbec1ecdcdf8dcfb): comparison url.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying rollup- to bors.

Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 9, 2021
@JulianKnodt
Copy link
Contributor Author

JulianKnodt commented Jan 9, 2021

Well, that's disappointing. I'm a bit unsure if there's anything additional I can do from here, since I can't really see what introduced the regression other than the force_infer_lt, and the memory taken by local variables should be the same or less than before.

If anyone has any better ideas, I can try implementing them, but barring that I'll probably just close this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

8 participants