Skip to content

Use download-rustc = "if-unchanged" in x86_64-gnu #112143

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 11 commits into from

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented May 31, 2023

This has two main benefits:

  1. It tests that download-rustc doesn't regress. This does introduce a new possible failure mode: because we use if-available, it's possible to land a change that breaks download-rustc only, causing all later PRs to fail unless they modify the compiler. However, I think the risk is pretty small in practice, since for us not to notice you'd have to change both compiler/ and bootstrap/ in such a way that download-rustc breaks.

  2. It greatly speeds up CI when compiler/ and library/ haven't been modified. Once the changes in
    Redesign bootstrap stages compiler-team#619 land, this will also be faster for changes to
    library/, and only changes to compiler/ will have to rebuild.


This includes a couple fixes for download-rustc itself which I can separate out easily if desired:

It also fixes a pre-existing bug where sanitizer tests would always fail when cross-compiled; I guess we just didn't have any CI exercising that before? I was able to replicate it with download-rustc disabled.

Finally, it makes some changes to CI itself:

  1. Enable download-rustc = "if-unchanged" for all PR CI jobs. This will rebuild rustc from source if compiler/ or library/ are modified, but download it otherwise:

    rust/src/bootstrap/config.rs

    Lines 1859 to 1861 in bff5ecd

    let has_changes = !t!(self
    .git()
    .args(&["diff-index", "--quiet", &commit, "--", &compiler, &library])
  2. Disable llvm.assertions if download-rustc is enabled. I think this should not reduce PR test coverage too much; before we were using llvm-config = /usr/lib/llvm-14, which already didn't have assertions enabled, and mingw-check didn't build LLVM at all.
  3. Switch from running the x86_64-gnu-llvm-14 job to x86_64-gnu in CI. This is because download-rustc doesn't support an externally provided LLVM (see Use download-rustc = "if-unchanged" in x86_64-gnu #112143 (comment)).

Note that this makes no changes at all to the full bors merge, which has exactly the same amount of coverage as before.


Some timing info:

Before any change x86_64-gnu-llvm-14 takes 37 minutes: https://github.com/rust-lang/rust/actions/runs/5193836686/jobs/9364870143?pr=112366
With just switching to x86_64-gnu, it takes 42 minutes: https://github.com/rust-lang/rust/actions/runs/5194131394/jobs/9365485340?pr=112296
After this change, x86_64-gnu takes 26 minutes: https://github.com/rust-lang/rust/actions/runs/5173293772/jobs/9318431702?pr=112143

@rustbot
Copy link
Collaborator

rustbot commented May 31, 2023

r? @ozkanonur

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels May 31, 2023
@jyn514 jyn514 added S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 31, 2023
@jyn514 jyn514 force-pushed the test-download-rustc branch from 513cfdc to b7d5951 Compare May 31, 2023 16:08
@onur-ozkan
Copy link
Member

The last commit changes looks good, do you want me to review first two commits too(as far as I see they aren't reviewed on the based PR)?

@rust-log-analyzer

This comment has been minimized.

@jyn514
Copy link
Member Author

jyn514 commented May 31, 2023

@ozkanonur sorry for the ping - I'm still getting this working and there will likely be a lot more changes in the meantime. No need to review just yet.

@jyn514 jyn514 marked this pull request as draft May 31, 2023 16:39
@jyn514
Copy link
Member Author

jyn514 commented May 31, 2023

@ozkanonur if you want to review #111802 that would be very helpful. I want Mark's review on #110701 though, it's kind of a hack and I want to know if he's ok with it.

@jyn514
Copy link
Member Author

jyn514 commented May 31, 2023

  = note: /usr/bin/ld: /home/jyn/src/rust/build/x86_64-unknown-linux-gnu/ci-rustc-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_driver-c7592e2a88951cbc.so: undefined reference to `llvm::DisableABIBreakingChecks@LLVM_16'
          collect2: error: ld returned 1 exit status
          
  = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link
  = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)

error: could not compile `rustdoc-tool` (bin "rustdoc_tool_binary") due to previous error
Build completed unsuccessful

this happens because the llvm in rust-dev doesn't match the llvm in rustc-dev, because ci enables llvm.assertions. i need to figure out if it's ok to just turn that off or whether bootstrap should get it working somehow.

@jyn514 jyn514 force-pushed the test-download-rustc branch from c8168fe to 1df123f Compare May 31, 2023 17:18
@rust-log-analyzer

This comment has been minimized.

@jyn514
Copy link
Member Author

jyn514 commented May 31, 2023

ugh, this is going to be messy. the latest failure is tests/codegen/stack-probes-call.rs, which fails on x86_64-gnu-llvm-14 because rust_probestack isn't generated.

 /checkout/tests/codegen/stack-probes-call.rs:23:11: error: CHECK: expected string not found in input
// CHECK: attributes #0 = { {{.*}}"probe-stack"="__rust_probestack"{{.*}} }
          ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/stack-probes-call.x86_64/stack-probes-call.ll:7:35: note: scanning from here
define void @foo() unnamed_addr #0 {
                                  ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/stack-probes-call.x86_64/stack-probes-call.ll:12:1: note: possible intended match here
Build completed unsuccessfully in 0:03:04
attributes #0 = { nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" }
^

i think what's going on is that it's also using the llvm from the rustc-dev component, instead of the one that's configured in llvm.llvm-config. that seems like a real bug in download-rustc that needs to be fixed.

@jyn514 jyn514 added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label May 31, 2023
@jyn514
Copy link
Member Author

jyn514 commented Jun 3, 2023

i think what's going on is that it's also using the llvm from the rustc-dev component, instead of the one that's configured in llvm.llvm-config. that seems like a real bug in download-rustc that needs to be fixed.

Ok, I spent some time looking into this today, using llvm.assertions and download-ci-llvm to test. Currently, there's the following libLLVM.so files in build (ignoring rustfmt and stage0 which aren't relevant here):

build/x86_64-unknown-linux-gnu/ci-llvm/lib/libLLVM-16-rust-1.72.0-nightly.so
build/x86_64-unknown-linux-gnu/ci-rustc/lib/libLLVM-16-rust-1.72.0-nightly.so
build/x86_64-unknown-linux-gnu/ci-rustc-sysroot/lib/libLLVM-16-rust-1.72.0-nightly.so

If the LLVM in ci-rustc-sysroot comes from ci-rustc, then rustdoc fails to link as in #112143 (comment). If it comes from ci-llvm, then the rustc used to compile rustdoc fails to run:

/home/jyn/src/rust3/build/x86_64-unknown-linux-gnu/ci-rustc-sysroot/bin/rustc: symbol lookup error: /home/jyn/src/rust3/build/x86_64-unknown-linux-gnu/ci-rustc-sysroot/lib/librustc_driver-c7592e2a88951cbc.so: undefined symbol: _ZN4llvm24DisableABIBreakingChecksE, version LLVM_16

I think the problem is not actually the file in ci-rustc-sysroot comes from ci-rustc, but that it is in the linker search path when compiling rustdoc. We should add build/host/ci-rustc-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib to the search path, but not build/host/ci-rustc-sysroot/lib.

I'm looking into where the search path is modified now.

@jyn514
Copy link
Member Author

jyn514 commented Jun 3, 2023

Ok, I don't think this is actually possible to support. Even if the libLLVM in ci-rustc-sysroot/lib comes from ci-rustc, the rustc_driver in ci-rustc-sysroot/lib/rustlib requires it to also come from ci-rustc.

I think I need to add code to bootstrap to disable combining llvm-config / download-ci-llvm = false with download-rustc. In the meantime I'll change CI not to trigger the bug.

the latest failure is tests/codegen/stack-probes-call.rs, which fails on x86_64-gnu-llvm-14 because rust_probestack isn't generated.

this is likely because we're setting the llvm version to the version of the host, not the rustc was compiled with - I'll see if I can fix it in compiletest.

@rust-log-analyzer

This comment has been minimized.

@nikic
Copy link
Contributor

nikic commented Jun 3, 2023

The x86_64-gnu-llvm-14 image is fundamentally incompatible with download-rustc. If I'm reading this right, you're trying to fix this by ... not actually making it llvm-14 if run in PR CI in particular? That's super confusing.

You should probably switch PR CI to use a different image if you want to use the option. I believe historically we used this one because it saves the LLVM build, but given that we have download-llvm now, that choice probably no longer makes sense, and we can use a more standard configuration.

@jyn514
Copy link
Member Author

jyn514 commented Jun 3, 2023

You should probably switch PR CI to use a different image if you want to use the option. I believe historically we used this one because it saves the LLVM build, but given that we have download-llvm now, that choice probably no longer makes sense, and we can use a more standard configuration.

oh, I hadn't considered that, that's a good idea :) i'm going to fix the rest of the CI failures before switching the image but i'll revert 63ebc7a after that

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@jyn514 jyn514 force-pushed the test-download-rustc branch from fc1df6b to 6ec96be Compare July 9, 2023 21:27
@rust-log-analyzer

This comment has been minimized.

jyn514 added 5 commits July 9, 2023 16:35
This is a pre-requisite for rust-lang#112143, which wants to start
using download-rustc in PRs. download-rustc doesn't allow providing an external LLVM.
This has two main benefits:

1. It tests that download-rustc doesn't regress. This doesn't reduce our test coverage, since we
   still never use `download-rustc` in a full bors merge, but it should make it a lot less likely that
   this breaks by accident.

2. It greatly speeds up CI when compiler/ and library/ haven't been modified. Once the changes in
   rust-lang/compiler-team#619 land, this will also be faster for changes to
   library/, and only changes to compiler/ will have to rebuild.
…ning in CI

Avoids the following error:
```
curl: (22) The requested URL returned error: 404

error: failed to download pre-built rustc from CI

note: old builds get deleted after a certain time
help: if trying to compile an old commit of rustc, disable `download-rustc` in config.toml:
[rust]
download-rustc = false
```

Note that this strategy is more complicated than the one for download-ci-llvm, which doesn't have to deal with rollup commits.
Eventually we should probably adopt this for LLVM too, to avoid bugs if someone forgets to mark an LLVM bump as rollup=never.

I tested this with `git -c user.email=bors@rust-lang.org -c user.name=bors commit --allow-empty -m 'test bors commit' && GITHUB_ACTIONS=true x check`.
these should compile from source; i have reasonable confidence in download-rustc, but not so much that i want to allow shipping it in dist artifacts.
…-error.rs

Not only are they a pain to update, but they differ depending on whether `parallel-rustc` is enabled or not
@jyn514 jyn514 force-pushed the test-download-rustc branch from 6ec96be to 2c3ad2d Compare July 9, 2023 21:36
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
git config --global core.autocrlf false
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  DOWNLOAD_RUSTC: 1
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 2c3ad2df66bc41fd097e89b85a48acc22300789d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
  submodules: false
  set-safe-directory: true
env:
  DOWNLOAD_RUSTC: 1
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 2c3ad2df66bc41fd097e89b85a48acc22300789d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
src/ci/scripts/setup-environment.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  DOWNLOAD_RUSTC: 1
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 2c3ad2df66bc41fd097e89b85a48acc22300789d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
src/ci/scripts/should-skip-this.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  DOWNLOAD_RUSTC: 1
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 2c3ad2df66bc41fd097e89b85a48acc22300789d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
src/ci/scripts/verify-channel.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  DOWNLOAD_RUSTC: 1
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 2c3ad2df66bc41fd097e89b85a48acc22300789d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
src/ci/scripts/collect-cpu-stats.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  DOWNLOAD_RUSTC: 1
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 2c3ad2df66bc41fd097e89b85a48acc22300789d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
src/ci/scripts/install-sccache.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  DOWNLOAD_RUSTC: 1
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 2c3ad2df66bc41fd097e89b85a48acc22300789d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
src/ci/scripts/select-xcode.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  DOWNLOAD_RUSTC: 1
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 2c3ad2df66bc41fd097e89b85a48acc22300789d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
src/ci/scripts/install-clang.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  DOWNLOAD_RUSTC: 1
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 2c3ad2df66bc41fd097e89b85a48acc22300789d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
src/ci/scripts/install-wix.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  DOWNLOAD_RUSTC: 1
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 2c3ad2df66bc41fd097e89b85a48acc22300789d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
src/ci/scripts/disable-git-crlf-conversion.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  DOWNLOAD_RUSTC: 1
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 2c3ad2df66bc41fd097e89b85a48acc22300789d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
src/ci/scripts/install-msys2.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  DOWNLOAD_RUSTC: 1
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 2c3ad2df66bc41fd097e89b85a48acc22300789d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
src/ci/scripts/install-mingw.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  DOWNLOAD_RUSTC: 1
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 2c3ad2df66bc41fd097e89b85a48acc22300789d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
src/ci/scripts/install-ninja.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  DOWNLOAD_RUSTC: 1
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 2c3ad2df66bc41fd097e89b85a48acc22300789d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
src/ci/scripts/enable-docker-ipv6.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  DOWNLOAD_RUSTC: 1
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 2c3ad2df66bc41fd097e89b85a48acc22300789d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
src/ci/scripts/disable-git-crlf-conversion.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  DOWNLOAD_RUSTC: 1
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 2c3ad2df66bc41fd097e89b85a48acc22300789d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
src/ci/scripts/verify-line-endings.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  DOWNLOAD_RUSTC: 1
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 2c3ad2df66bc41fd097e89b85a48acc22300789d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
src/ci/scripts/verify-backported-commits.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  DOWNLOAD_RUSTC: 1
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 2c3ad2df66bc41fd097e89b85a48acc22300789d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
src/ci/scripts/verify-stable-version-number.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  DOWNLOAD_RUSTC: 1
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 2c3ad2df66bc41fd097e89b85a48acc22300789d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
src/ci/scripts/run-build-from-ci.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  DOWNLOAD_RUSTC: 1
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 2c3ad2df66bc41fd097e89b85a48acc22300789d
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
== end clock drift check ==
sccache: Starting the server...
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--save-toolstates=/tmp/toolstate/toolstates.json', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.download-rustc=if-unchanged', '--set', 'rust.verify-llvm-ir', '--set', 'llvm.download-ci-llvm=if-available', '--enable-missing-tools']
configure: rust.save-toolstates := /tmp/toolstate/toolstates.json
configure: llvm.ccache          := sccache
configure: build.submodules     := False
configure: build.locked-deps    := True
configure: build.locked-deps    := True
configure: build.cargo-native-static := True
configure: rust.codegen-units-std := 1
configure: dist.compression-profile := balanced
configure: rust.download-rustc  := if-unchanged
configure: llvm.download-ci-llvm := if-available
configure: dist.compression-formats := ['xz']
configure: rust.dist-src        := False
configure: rust.channel         := nightly
---
downloading https://ci-artifacts.rust-lang.org/rustc-builds-alt/1065d876cdbc34a872b9e17c78caaa59ea0c94d4/rust-std-nightly-x86_64-unknown-linux-gnu.tar.xz

#                                                                          1.7%
######################################################################## 100.0%
extracting /checkout/obj/build/cache/1065d876cdbc34a872b9e17c78caaa59ea0c94d4-true/rust-std-nightly-x86_64-unknown-linux-gnu.tar.xz to /checkout/obj/build/x86_64-unknown-linux-gnu/ci-rustc

                                                                           0.0%
########################                                                  33.8%
##################################################                        69.5%
##################################################                        69.5%
################################################################          89.4%
######################################################################## 100.0%
extracting /checkout/obj/build/cache/1065d876cdbc34a872b9e17c78caaa59ea0c94d4-true/rustc-nightly-x86_64-unknown-linux-gnu.tar.xz to /checkout/obj/build/x86_64-unknown-linux-gnu/ci-rustc

                                                                           0.0%
########                                                                  11.6%
##############                                                            20.4%
##############                                                            20.4%
############################                                              39.5%
#####################################                                     52.1%
##################################################                        70.8%
#####################################################################     96.5%
######################################################################## 100.0%
extracting /checkout/obj/build/cache/1065d876cdbc34a872b9e17c78caaa59ea0c94d4-true/rustc-dev-nightly-x86_64-unknown-linux-gnu.tar.xz to /checkout/obj/build/x86_64-unknown-linux-gnu/ci-rustc
warning: creating symbolic link `/checkout/obj/build/x86_64-unknown-linux-gnu/ci-rustc-sysroot/lib/rustlib/rustc-src/rust` to `/checkout` failed with File exists (os error 17)

                                                                           0.0%
############################                                              39.9%
#####################################################                     74.7%
#####################################################                     74.7%
######################################################################## 100.0%
extracting /checkout/obj/build/cache/llvm-1065d876cdbc34a872b9e17c78caaa59ea0c94d4-true/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz to /checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm
warning: creating symbolic link `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/rustc-src/rust` to `/checkout` failed with File exists (os error 17)
Creating a sysroot for stage2 compiler (use `rustup toolchain link 'name' build/host/stage2`)
##[group]Building tool rustdoc (stage1 -> stage2, x86_64-unknown-linux-gnu)
    Updating crates.io index
---
Build completed successfully in 0:00:00
##[group]Building bootstrap
    Finished dev [unoptimized] target(s) in 0.03s
##[endgroup]
warning: creating symbolic link `/checkout/obj/build/x86_64-unknown-linux-gnu/ci-rustc-sysroot/lib/rustlib/rustc-src/rust` to `/checkout` failed with File exists (os error 17)
warning: creating symbolic link `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/rustc-src/rust` to `/checkout` failed with File exists (os error 17)
##[group]Building tool clippy-driver (stage2 -> stage3, x86_64-unknown-linux-gnu)
---
tests/ui/crashes/ice-10148.rs ... ok
tests/ui/missing_const_for_fn/cant_be_const.rs ... ok

tests/ui/empty_line_after_doc_comments.rs FAILED:
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Zui-testing" "-Dwarnings" "--extern" "clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libclippy_lints-73a44cb4c7cea627.rlib" "--extern" "clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libclippy_lints-73a44cb4c7cea627.rmeta" "--extern" "clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libclippy_utils-7e3201eedda9725b.rlib" "--extern" "clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libclippy_utils-7e3201eedda9725b.rmeta" "--extern" "derive_new=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/deps/libderive_new-c02f7361dc6f59be.so" "--extern" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libfutures-3b3f678a2023a864.rlib" "--extern" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libfutures-3b3f678a2023a864.rmeta" "--extern" "if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libif_chain-6d2bcde5417e3fc9.rlib" "--extern" "if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libif_chain-6d2bcde5417e3fc9.rmeta" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/deps/libitertools-a295c739cb0c5115.rlib" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/deps/libitertools-a295c739cb0c5115.rmeta" "--extern" "parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libparking_lot-26458fd927156f14.rlib" "--extern" "parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libparking_lot-26458fd927156f14.rmeta" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libquote-36054bcec486f3c0.rlib" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libquote-36054bcec486f3c0.rmeta" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libregex-4e61c4979f33639c.rlib" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libregex-4e61c4979f33639c.rmeta" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libserde-b9f428a504ba38d4.rlib" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libserde-b9f428a504ba38d4.rmeta" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/deps/libsyn-faa18c63fc12a335.rlib" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/deps/libsyn-faa18c63fc12a335.rmeta" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libtokio-ee648a3a992ea021.rlib" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libtokio-ee648a3a992ea021.rmeta" "--extern" "clippy_test_deps=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/libclippy_test_deps.rlib" "--extern" "clippy_test_deps=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libclippy_test_deps-728ed027f0623fde.rmeta" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/pulldown-cmark-5d2703cd75133d86" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/futures-task-14f797a867cbbbea" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/tokio-988b1ca3d2062fb8" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/futures-util-d30abe96b847bc06" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/serde_json-06fa4ab4a6a2c54b" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/serde-b5ab3846bee6426e" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/parking_lot_core-ff12b1c9a236dc80" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/camino-95d981076bbda069" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/libc-467a9bf5fecaa5b9" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/proc-macro2-c56f6977d10d30ea" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/thiserror-60234973db2aebdd" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/syn-c0e5e037aa06912e" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/quote-fc00b89c3984f431" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/lock_api-172e9730276f85f1" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/slab-084e9e34eeb9970c" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/futures-channel-18c61a4c728f3f63" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/unicase-dc66fd2ee33a4c53" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/memchr-300f0ecb3b085bd3" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/semver-367f0564b96a3f38" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/futures-core-67d40d21860bf7e2" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui/empty_line_after_doc_comments" "tests/ui/auxiliary/proc_macro_attr.rs" "--edition" "2021" "--crate-type" "proc-macro" "--emit=link"


Aux build from tests/ui/empty_line_after_doc_comments.rs:1 failed
compilation of aux build failed failed with exit status: 1
compilation of aux build failed failed with exit status: 1


full stderr:
error[E0308]: mismatched types
##[error]  --> tests/ui/auxiliary/proc_macro_attr.rs:33:32
   |
LL |                   let my_block = quote_spanned!( brace.span => {
   |  ________________________________^
LL | |                     // Should not trigger `empty_line_after_outer_attr`
LL | |                     #[crate_type = "lib"]
LL | |                     #sig #block
LL | |                     Vec::new()
   | |                  ^
   | |                  |
   | |                  |
   | |__________________expected `Span`, found `DelimSpan`
   |
   = note: this error originates in the macro `quote_spanned` (in Nightly builds, run with -Z macro-backtrace for more info)


error[E0277]: the trait bound `syn::Signature: quote::ToTokens` is not satisfied
   |
   |
LL |                   let my_block = quote_spanned!( brace.span => {
   |  ________________________________^
LL | |                     // Should not trigger `empty_line_after_outer_attr`
LL | |                     #[crate_type = "lib"]
LL | |                     #sig #block
LL | |                     Vec::new()
   | |                  ^
   | |                  |
   | |                  |
   | |__________________the trait `quote::ToTokens` is not implemented for `syn::Signature`
   |
   |
   = help: the following other types implement trait `quote::ToTokens`:
             char
             isize
             i8
             i16
             i16
             i32
             i64
             i128
           and 23 others
   = note: required for `&syn::Signature` to implement `quote::ToTokens`
   = note: this error originates in the macro `$crate::quote_token_with_context_spanned` which comes from the expansion of the macro `quote_spanned` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `syn::Block: quote::ToTokens` is not satisfied
   |
   |
LL |                   let my_block = quote_spanned!( brace.span => {
   |  ________________________________^
LL | |                     // Should not trigger `empty_line_after_outer_attr`
LL | |                     #[crate_type = "lib"]
LL | |                     #sig #block
LL | |                     Vec::new()
   | |                  ^
   | |                  |
   | |                  |
   | |__________________the trait `quote::ToTokens` is not implemented for `syn::Block`
   |
   |
   = help: the following other types implement trait `quote::ToTokens`:
             char
             isize
             i8
             i16
             i16
             i32
             i64
             i128
           and 23 others
   = note: required for `&mut syn::Block` to implement `quote::ToTokens`
   = note: this error originates in the macro `$crate::quote_token_with_context_spanned` which comes from the expansion of the macro `quote_spanned` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `quote::__private::TokenStream: syn::__private::ToTokens` is not satisfied
   |
   |
LL |                 *block = parse_quote!(#my_block);
   |                          |
   |                          |
   |                          the trait `syn::__private::ToTokens` is not implemented for `quote::__private::TokenStream`
   |
   |
   = help: the following other types implement trait `syn::__private::ToTokens`:
             char
             isize
             i8
             i16
             i16
             i32
             i64
             i128
           and 298 others
   = note: this error originates in the macro `$crate::__private::quote::quote` which comes from the expansion of the macro `parse_quote` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `syn::ItemTrait: quote::ToTokens` is not satisfied
   |
   |
LL |     TokenStream::from(quote!(#item))
   |                       |
   |                       |
   |                       the trait `quote::ToTokens` is not implemented for `syn::ItemTrait`
   |
   |
   = help: the following other types implement trait `quote::ToTokens`:
             char
             isize
             i8
             i16
             i16
             i32
             i64
             i128
           and 23 others
   = note: this error originates in the macro `quote` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `syn::ItemImpl: quote::ToTokens` is not satisfied
   |
   |
LL |     TokenStream::from(quote!(#item))
   |                       |
   |                       |
   |                       the trait `quote::ToTokens` is not implemented for `syn::ItemImpl`
   |
   |
   = help: the following other types implement trait `quote::ToTokens`:
             char
             isize
             i8
             i16
---



tests/ui/empty_line_after_outer_attribute.rs FAILED:
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Zui-testing" "-Dwarnings" "--extern" "clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libclippy_lints-73a44cb4c7cea627.rlib" "--extern" "clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libclippy_lints-73a44cb4c7cea627.rmeta" "--extern" "clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libclippy_utils-7e3201eedda9725b.rlib" "--extern" "clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libclippy_utils-7e3201eedda9725b.rmeta" "--extern" "derive_new=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/deps/libderive_new-c02f7361dc6f59be.so" "--extern" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libfutures-3b3f678a2023a864.rlib" "--extern" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libfutures-3b3f678a2023a864.rmeta" "--extern" "if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libif_chain-6d2bcde5417e3fc9.rlib" "--extern" "if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libif_chain-6d2bcde5417e3fc9.rmeta" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/deps/libitertools-a295c739cb0c5115.rlib" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/deps/libitertools-a295c739cb0c5115.rmeta" "--extern" "parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libparking_lot-26458fd927156f14.rlib" "--extern" "parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libparking_lot-26458fd927156f14.rmeta" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libquote-36054bcec486f3c0.rlib" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libquote-36054bcec486f3c0.rmeta" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libregex-4e61c4979f33639c.rlib" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libregex-4e61c4979f33639c.rmeta" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libserde-b9f428a504ba38d4.rlib" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libserde-b9f428a504ba38d4.rmeta" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/deps/libsyn-faa18c63fc12a335.rlib" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/deps/libsyn-faa18c63fc12a335.rmeta" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libtokio-ee648a3a992ea021.rlib" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libtokio-ee648a3a992ea021.rmeta" "--extern" "clippy_test_deps=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/libclippy_test_deps.rlib" "--extern" "clippy_test_deps=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libclippy_test_deps-728ed027f0623fde.rmeta" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/pulldown-cmark-5d2703cd75133d86" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/futures-task-14f797a867cbbbea" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/tokio-988b1ca3d2062fb8" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/futures-util-d30abe96b847bc06" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/serde_json-06fa4ab4a6a2c54b" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/serde-b5ab3846bee6426e" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/parking_lot_core-ff12b1c9a236dc80" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/camino-95d981076bbda069" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/libc-467a9bf5fecaa5b9" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/proc-macro2-c56f6977d10d30ea" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/thiserror-60234973db2aebdd" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/syn-c0e5e037aa06912e" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/quote-fc00b89c3984f431" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/lock_api-172e9730276f85f1" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/slab-084e9e34eeb9970c" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/futures-channel-18c61a4c728f3f63" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/unicase-dc66fd2ee33a4c53" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/memchr-300f0ecb3b085bd3" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/semver-367f0564b96a3f38" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/futures-core-67d40d21860bf7e2" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui/empty_line_after_outer_attribute" "tests/ui/auxiliary/proc_macro_attr.rs" "--edition" "2021" "--crate-type" "proc-macro" "--emit=link"


Aux build from tests/ui/empty_line_after_outer_attribute.rs:1 failed
compilation of aux build failed failed with exit status: 1
compilation of aux build failed failed with exit status: 1


full stderr:
error[E0308]: mismatched types
##[error]  --> tests/ui/auxiliary/proc_macro_attr.rs:33:32
   |
LL |                   let my_block = quote_spanned!( brace.span => {
   |  ________________________________^
LL | |                     // Should not trigger `empty_line_after_outer_attr`
LL | |                     #[crate_type = "lib"]
LL | |                     #sig #block
LL | |                     Vec::new()
   | |                  ^
   | |                  |
   | |                  |
   | |__________________expected `Span`, found `DelimSpan`
   |
   = note: this error originates in the macro `quote_spanned` (in Nightly builds, run with -Z macro-backtrace for more info)


error[E0277]: the trait bound `syn::Signature: quote::ToTokens` is not satisfied
   |
   |
LL |                   let my_block = quote_spanned!( brace.span => {
   |  ________________________________^
LL | |                     // Should not trigger `empty_line_after_outer_attr`
LL | |                     #[crate_type = "lib"]
LL | |                     #sig #block
LL | |                     Vec::new()
   | |                  ^
   | |                  |
   | |                  |
   | |__________________the trait `quote::ToTokens` is not implemented for `syn::Signature`
   |
   |
   = help: the following other types implement trait `quote::ToTokens`:
             char
             isize
             i8
             i16
             i16
             i32
             i64
             i128
           and 23 others
   = note: required for `&syn::Signature` to implement `quote::ToTokens`
   = note: this error originates in the macro `$crate::quote_token_with_context_spanned` which comes from the expansion of the macro `quote_spanned` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `syn::Block: quote::ToTokens` is not satisfied
   |
   |
LL |                   let my_block = quote_spanned!( brace.span => {
   |  ________________________________^
LL | |                     // Should not trigger `empty_line_after_outer_attr`
LL | |                     #[crate_type = "lib"]
LL | |                     #sig #block
LL | |                     Vec::new()
   | |                  ^
   | |                  |
   | |                  |
   | |__________________the trait `quote::ToTokens` is not implemented for `syn::Block`
   |
   |
   = help: the following other types implement trait `quote::ToTokens`:
             char
             isize
             i8
             i16
             i16
             i32
             i64
             i128
           and 23 others
   = note: required for `&mut syn::Block` to implement `quote::ToTokens`
   = note: this error originates in the macro `$crate::quote_token_with_context_spanned` which comes from the expansion of the macro `quote_spanned` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `quote::__private::TokenStream: syn::__private::ToTokens` is not satisfied
   |
   |
LL |                 *block = parse_quote!(#my_block);
   |                          |
   |                          |
   |                          the trait `syn::__private::ToTokens` is not implemented for `quote::__private::TokenStream`
   |
   |
   = help: the following other types implement trait `syn::__private::ToTokens`:
             char
             isize
             i8
             i16
             i16
             i32
             i64
             i128
           and 298 others
   = note: this error originates in the macro `$crate::__private::quote::quote` which comes from the expansion of the macro `parse_quote` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `syn::ItemTrait: quote::ToTokens` is not satisfied
   |
   |
LL |     TokenStream::from(quote!(#item))
   |                       |
   |                       |
   |                       the trait `quote::ToTokens` is not implemented for `syn::ItemTrait`
   |
   |
   = help: the following other types implement trait `quote::ToTokens`:
             char
             isize
             i8
             i16
             i16
             i32
             i64
             i128
           and 23 others
   = note: this error originates in the macro `quote` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `syn::ItemImpl: quote::ToTokens` is not satisfied
   |
   |
LL |     TokenStream::from(quote!(#item))
   |                       |
   |                       |
   |                       the trait `quote::ToTokens` is not implemented for `syn::ItemImpl`
   |
   |
   = help: the following other types implement trait `quote::ToTokens`:
             char
             isize
             i8
             i16
---



tests/ui/needless_arbitrary_self_type_unfixable.rs FAILED:
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Zui-testing" "-Dwarnings" "--extern" "clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libclippy_lints-73a44cb4c7cea627.rlib" "--extern" "clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libclippy_lints-73a44cb4c7cea627.rmeta" "--extern" "clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libclippy_utils-7e3201eedda9725b.rlib" "--extern" "clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libclippy_utils-7e3201eedda9725b.rmeta" "--extern" "derive_new=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/deps/libderive_new-c02f7361dc6f59be.so" "--extern" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libfutures-3b3f678a2023a864.rlib" "--extern" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libfutures-3b3f678a2023a864.rmeta" "--extern" "if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libif_chain-6d2bcde5417e3fc9.rlib" "--extern" "if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libif_chain-6d2bcde5417e3fc9.rmeta" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/deps/libitertools-a295c739cb0c5115.rlib" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/deps/libitertools-a295c739cb0c5115.rmeta" "--extern" "parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libparking_lot-26458fd927156f14.rlib" "--extern" "parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libparking_lot-26458fd927156f14.rmeta" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libquote-36054bcec486f3c0.rlib" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libquote-36054bcec486f3c0.rmeta" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libregex-4e61c4979f33639c.rlib" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libregex-4e61c4979f33639c.rmeta" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libserde-b9f428a504ba38d4.rlib" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libserde-b9f428a504ba38d4.rmeta" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/deps/libsyn-faa18c63fc12a335.rlib" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/deps/libsyn-faa18c63fc12a335.rmeta" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libtokio-ee648a3a992ea021.rlib" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libtokio-ee648a3a992ea021.rmeta" "--extern" "clippy_test_deps=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/libclippy_test_deps.rlib" "--extern" "clippy_test_deps=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps/libclippy_test_deps-728ed027f0623fde.rmeta" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/pulldown-cmark-5d2703cd75133d86" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/futures-task-14f797a867cbbbea" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/tokio-988b1ca3d2062fb8" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/futures-util-d30abe96b847bc06" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/serde_json-06fa4ab4a6a2c54b" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/serde-b5ab3846bee6426e" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/parking_lot_core-ff12b1c9a236dc80" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/camino-95d981076bbda069" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/libc-467a9bf5fecaa5b9" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/proc-macro2-c56f6977d10d30ea" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/thiserror-60234973db2aebdd" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/x86_64-unknown-linux-gnu/debug/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/syn-c0e5e037aa06912e" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/quote-fc00b89c3984f431" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/lock_api-172e9730276f85f1" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/slab-084e9e34eeb9970c" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/futures-channel-18c61a4c728f3f63" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/unicase-dc66fd2ee33a4c53" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/memchr-300f0ecb3b085bd3" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/semver-367f0564b96a3f38" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/debug/build/futures-core-67d40d21860bf7e2" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui/needless_arbitrary_self_type_unfixable" "tests/ui/auxiliary/proc_macro_attr.rs" "--edition" "2021" "--crate-type" "proc-macro" "--emit=link"


Aux build from tests/ui/needless_arbitrary_self_type_unfixable.rs:1 failed
compilation of aux build failed failed with exit status: 1
compilation of aux build failed failed with exit status: 1


full stderr:
error[E0308]: mismatched types
##[error]  --> tests/ui/auxiliary/proc_macro_attr.rs:33:32
   |
LL |                   let my_block = quote_spanned!( brace.span => {
   |  ________________________________^
LL | |                     // Should not trigger `empty_line_after_outer_attr`
LL | |                     #[crate_type = "lib"]
LL | |                     #sig #block
LL | |                     Vec::new()
   | |                  ^
   | |                  |
   | |                  |
   | |__________________expected `Span`, found `DelimSpan`
   |
   = note: this error originates in the macro `quote_spanned` (in Nightly builds, run with -Z macro-backtrace for more info)


error[E0277]: the trait bound `syn::Signature: quote::ToTokens` is not satisfied
   |
   |
LL |                   let my_block = quote_spanned!( brace.span => {
   |  ________________________________^
LL | |                     // Should not trigger `empty_line_after_outer_attr`
LL | |                     #[crate_type = "lib"]
LL | |                     #sig #block
LL | |                     Vec::new()
   | |                  ^
   | |                  |
   | |                  |
   | |__________________the trait `quote::ToTokens` is not implemented for `syn::Signature`
   |
   |
   = help: the following other types implement trait `quote::ToTokens`:
             char
             isize
             i8
             i16
             i16
             i32
             i64
             i128
           and 23 others
   = note: required for `&syn::Signature` to implement `quote::ToTokens`
   = note: this error originates in the macro `$crate::quote_token_with_context_spanned` which comes from the expansion of the macro `quote_spanned` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `syn::Block: quote::ToTokens` is not satisfied
   |
   |
LL |                   let my_block = quote_spanned!( brace.span => {
   |  ________________________________^
LL | |                     // Should not trigger `empty_line_after_outer_attr`
LL | |                     #[crate_type = "lib"]
LL | |                     #sig #block
LL | |                     Vec::new()
   | |                  ^
   | |                  |
   | |                  |
   | |__________________the trait `quote::ToTokens` is not implemented for `syn::Block`
   |
   |
   = help: the following other types implement trait `quote::ToTokens`:
             char
             isize
             i8
             i16
             i16
             i32
             i64
             i128
           and 23 others
   = note: required for `&mut syn::Block` to implement `quote::ToTokens`
   = note: this error originates in the macro `$crate::quote_token_with_context_spanned` which comes from the expansion of the macro `quote_spanned` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `quote::__private::TokenStream: syn::__private::ToTokens` is not satisfied
   |
   |
LL |                 *block = parse_quote!(#my_block);
   |                          |
   |                          |
   |                          the trait `syn::__private::ToTokens` is not implemented for `quote::__private::TokenStream`
   |
   |
   = help: the following other types implement trait `syn::__private::ToTokens`:
             char
             isize
             i8
             i16
             i16
             i32
             i64
             i128
           and 298 others
   = note: this error originates in the macro `$crate::__private::quote::quote` which comes from the expansion of the macro `parse_quote` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `syn::ItemTrait: quote::ToTokens` is not satisfied
   |
   |
LL |     TokenStream::from(quote!(#item))
   |                       |
   |                       |
   |                       the trait `quote::ToTokens` is not implemented for `syn::ItemTrait`
   |
   |
   = help: the following other types implement trait `quote::ToTokens`:
             char
             isize
             i8
             i16
             i16
             i32
             i64
             i128
           and 23 others
   = note: this error originates in the macro `quote` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `syn::ItemImpl: quote::ToTokens` is not satisfied
   |
   |
LL |     TokenStream::from(quote!(#item))
   |                       |
   |                       |
   |                       the trait `quote::ToTokens` is not implemented for `syn::ItemImpl`
   |
   |
   = help: the following other types implement trait `quote::ToTokens`:
             char
             isize
             i8
             i16

workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Jul 12, 2023
…ertlarsan68

various download-rustc fixes

separated out from rust-lang#112143 because it keeps getting stuck in limbo.

best reviewed commit-by-commit
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Jul 12, 2023
…ertlarsan68

various download-rustc fixes

separated out from rust-lang#112143 because it keeps getting stuck in limbo.

best reviewed commit-by-commit
@bors
Copy link
Collaborator

bors commented Jul 12, 2023

☔ The latest upstream changes (presumably #113608) made this pull request unmergeable. Please resolve the merge conflicts.

@jyn514
Copy link
Member Author

jyn514 commented Jul 12, 2023

update on the current status: supporting llvm.assertions means we started using rustc-builds-alt for download-rustc in CI, which also enables parallel_compiler. i started making some related fixes (#113606, #113611) and then ran into #106930 which needs major overhauls to rustdoc. thinking about this more though i think that might actually be possible to workaround since CI is using parallel-compiler for rustc but not for tools. i'll be able to test once #113606 lands and has CI artifacts to download.

cc @SparrowLii can you confirm whether linking a rustc_driver built with parallel-compiler to a rustdoc built without is expected to work?


in any case, if this ends up being significantly more work than expected i'll look into using the -alt builds for LLVM only and not rustc_driver. that will be kinda painful (we'll need 4 states instead of 2) but it will avoid needing to fix all parallel-compiler test failures before landing this.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 12, 2023
…=ozkanonur

Remap paths for ~/.cargo in UI tests

Users won't have the original cargo registry from the CI builder available, even if they have `rust-src` installed. Don't show their sources in UI tests even if they're available. As a happy side-effect, this fixes a few UI tests when download-rustc is enabled.

Helps with rust-lang#112143.
@SparrowLii
Copy link
Member

SparrowLii commented Jul 13, 2023

cc @SparrowLii can you confirm whether linking a rustc_driver built with parallel-compiler to a rustdoc built without is expected to work?

Sorry, I don't think they will link and work properly :( since the data structures implementation in rustc_data_structures is inconsistent

@jyn514
Copy link
Member Author

jyn514 commented Jul 13, 2023

hmm, it seems to work ok locally - i think rustdoc loads rustc_data_structures from the sysroot instead of recompiling, so there's only one version :)

looking at rustdoc i think the only part of that changes with parallel_compiler (other than the auto traits thing) is

rust/src/librustdoc/lib.rs

Lines 213 to 214 in cef812b

#[cfg(all(parallel_compiler, debug_assertions))]
let layer = layer.with_thread_ids(true).with_thread_names(true);

@jyn514
Copy link
Member Author

jyn514 commented Jul 15, 2023

going to set this to waiting-on-review until i hear back about #112143 (comment)

@jyn514 jyn514 added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 15, 2023
@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 31, 2023
@Mark-Simulacrum
Copy link
Member

Mark-Simulacrum commented Jul 31, 2023

Disable llvm.assertions if download-rustc is enabled. I think this should not reduce PR test coverage too much; before we were using llvm-config = /usr/lib/llvm-14, which already didn't have assertions enabled, and mingw-check didn't build LLVM at all.

Is this still part of this PR? I don't see it in the diff I think. I agree that test coverage doesn't reduce too much (we do lose all the testing on mingw-check and gnu-tools for exercising the alt build paths in bootstrap and in terms of building compiler + tools).

But I guess this seems OK for now. I would prefer that we hard gate this on PR CI though if possible, so we don't accidentally stop testing assertions globally in the future.

@jyn514
Copy link
Member Author

jyn514 commented Aug 21, 2023

rust-lang/team#1051

@jyn514 jyn514 closed this Aug 21, 2023
jyn514 added a commit to jyn514/rust that referenced this pull request Nov 13, 2023
This is a pre-requisite for rust-lang#112143, which wants to start
using download-rustc in PRs. download-rustc doesn't allow providing an external LLVM.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants