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

librustdoc: return impl fmt::Display in more places instead of writing to strings #137425

Merged

Conversation

yotamofek
Copy link
Contributor

Continuation of #136784 , another attempt at landing the larger parts of #136748 .
I'd like to, gradually, make all of the building blocks for rendering docs in librustdoc return impl fmt::Display instead of returning Strings, or receiving a &mut String (or &mut impl fmt::Write). Another smaller end goal is to be able to get rid of write_str.
This PR is a large step in that direction.

Most of the changes are quite mechanical, and split up into separate commits for easier reviewing (hopefully). I took print_item and then started by converting all the functions it called (and their dependencies), and the last commit does the conversion for print_item itself. Ignoring whitespace should make reviewing a bit easier.

And most importantly, perf run shows pretty good results locally, hopefully CI will also show green 😁

r? @GuillaumeGomez , if you feel like it.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Feb 22, 2025
@lukas-code
Copy link
Member

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Feb 22, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 22, 2025
…play-redux, r=<try>

`librustdoc`: return `impl fmt::Display` in more places instead of writing to strings

Continuation of rust-lang#136784 , another attempt at landing the larger parts of rust-lang#136748 .
I'd like to, gradually, make all of the building blocks for rendering docs in `librustdoc` return `impl fmt::Display` instead of returning `Strings`, or receiving a `&mut String` (or `&mut impl fmt::Write`). Another smaller end goal is to be able to get rid of [`write_str`](https://github.com/rust-lang/rust/blob/8dac72bb1d12b2649acd0c190e41524f83da5683/src/librustdoc/html/format.rs#L40-L42).
This PR is a large step in that direction.

Most of the changes are quite mechanical, and split up into separate commits for easier reviewing (hopefully). I took `print_item` and then started by converting all the functions it called (and their dependencies), and the last commit does the conversion for `print_item` itself. Ignoring whitespace should make reviewing a bit easier.

And most importantly, perf run shows pretty good results locally, hopefully CI will also show green 😁

r? `@GuillaumeGomez` , if you feel like it.
@bors
Copy link
Contributor

bors commented Feb 22, 2025

⌛ Trying commit 1015ae9 with merge d331e3c...

@GuillaumeGomez
Copy link
Member

Looks good to me, let's see what the benches will tell.

@bors
Copy link
Contributor

bors commented Feb 22, 2025

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d331e3c): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

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

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.6% [-1.2%, -0.2%] 4
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.3%] 1
All ❌✅ (primary) -0.6% [-1.2%, -0.2%] 4

Max RSS (memory usage)

Results (primary 3.3%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
3.3% [3.3%, 3.3%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.3% [3.3%, 3.3%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 773.405s -> 773.68s (0.04%)
Artifact size: 361.04 MiB -> 361.04 MiB (0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Feb 22, 2025
@GuillaumeGomez
Copy link
Member

Thanks!

@bors r+ rollup=never

@bors
Copy link
Contributor

bors commented Feb 22, 2025

📌 Commit 1015ae9 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 22, 2025
@fmease
Copy link
Member

fmease commented Feb 22, 2025

Sorry but can you squash this? 28 commits is a bit excessive.

@fmease
Copy link
Member

fmease commented Feb 22, 2025

@bors r-

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 22, 2025
@yotamofek
Copy link
Contributor Author

Sorry but can you squash this? 28 commits is a bit excessive.

Yeah, sure! One big commit then? Not really sure how to group it, otherwise

@fmease
Copy link
Member

fmease commented Feb 22, 2025

Either one big commit but one commit per file would be also be acceptable unless that makes no sense.

@yotamofek yotamofek force-pushed the pr/rustdoc/return-impl-display-redux branch from 1015ae9 to 479116e Compare February 23, 2025 04:34
@yotamofek
Copy link
Contributor Author

@fmease squashed into one commit

@fmease
Copy link
Member

fmease commented Feb 23, 2025

Thanks! @bors r=GuillaumeGomez

@bors
Copy link
Contributor

bors commented Feb 23, 2025

📌 Commit 479116e has been approved by GuillaumeGomez

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 23, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 27, 2025
…play-redux, r=GuillaumeGomez

`librustdoc`: return `impl fmt::Display` in more places instead of writing to strings

Continuation of rust-lang#136784 , another attempt at landing the larger parts of rust-lang#136748 .
I'd like to, gradually, make all of the building blocks for rendering docs in `librustdoc` return `impl fmt::Display` instead of returning `Strings`, or receiving a `&mut String` (or `&mut impl fmt::Write`). Another smaller end goal is to be able to get rid of [`write_str`](https://github.com/rust-lang/rust/blob/8dac72bb1d12b2649acd0c190e41524f83da5683/src/librustdoc/html/format.rs#L40-L42).
This PR is a large step in that direction.

Most of the changes are quite mechanical, and split up into separate commits for easier reviewing (hopefully). I took `print_item` and then started by converting all the functions it called (and their dependencies), and the last commit does the conversion for `print_item` itself. Ignoring whitespace should make reviewing a bit easier.

And most importantly, perf run shows pretty good results locally, hopefully CI will also show green 😁

r? `@GuillaumeGomez` , if you feel like it.
@bors
Copy link
Contributor

bors commented Feb 27, 2025

⌛ Testing commit 479116e with merge ff5e4ae...

@rust-log-analyzer
Copy link
Collaborator

The job i686-msvc-1 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
warning: [email protected]: In file included from llvm-wrapper/PassWrapper.cpp:1:
warning: [email protected]: In file included from llvm-wrapper\LLVMWrapper.h:7:
warning: [email protected]: In file included from D:\a\rust\rust\build\i686-pc-windows-msvc\llvm\include\llvm/Support/raw_ostream.h:16:
warning: [email protected]: In file included from D:\a\rust\rust\build\i686-pc-windows-msvc\llvm\include\llvm/ADT/SmallVector.h:18:
warning: [email protected]: In file included from C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\algorithm:10:
warning: [email protected]: In file included from C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\__msvc_heap_algorithms.hpp:11:
warning: [email protected]: In file included from C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\xutility:15:
warning: [email protected]: In file included from C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\cwchar:12:
warning: [email protected]: C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(294,13): error: unknown type name '__m128i'
warning: [email protected]:   294 |             __m128i V2 = _mm_set1_epi16((short)_C);
warning: [email protected]:       |             ^
warning: [email protected]: C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(294,26): error: use of undeclared identifier '_mm_set1_epi16'
warning: [email protected]:   294 |             __m128i V2 = _mm_set1_epi16((short)_C);
warning: [email protected]:       |                          ^
warning: [email protected]: C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(298,17): error: unknown type name '__m128i'
warning: [email protected]:   298 |                 __m128i V1 = _mm_loadu_si128((__m128i const*)S);
warning: [email protected]:       |                 ^
warning: [email protected]: C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(298,47): error: use of undeclared identifier '__m128i'
warning: [email protected]:   298 |                 __m128i V1 = _mm_loadu_si128((__m128i const*)S);
warning: [email protected]:       |                                               ^
warning: [email protected]: C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(313,17): error: unknown type name '__m128i'
warning: [email protected]:   313 |                 __m128i V1 = _mm_loadu_si64(S);
warning: [email protected]:       |                 ^
warning: [email protected]: C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(313,30): error: use of undeclared identifier '_mm_loadu_si64'
warning: [email protected]:   313 |                 __m128i V1 = _mm_loadu_si64(S);
warning: [email protected]:       |                              ^
warning: [email protected]: C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(418,13): error: unknown type name '__m128i'
warning: [email protected]:   418 |             __m128i V1 = _mm_loadu_si128((__m128i const*)S1);
warning: [email protected]:       |             ^
warning: [email protected]: C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(418,43): error: use of undeclared identifier '__m128i'
warning: [email protected]:   418 |             __m128i V1 = _mm_loadu_si128((__m128i const*)S1);
warning: [email protected]:       |                                           ^
warning: [email protected]: C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(419,13): error: unknown type name '__m128i'
warning: [email protected]:   419 |             __m128i V2 = _mm_loadu_si128((__m128i const*)S2);
warning: [email protected]:       |             ^
warning: [email protected]: C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(419,43): error: use of undeclared identifier '__m128i'
warning: [email protected]:   419 |             __m128i V2 = _mm_loadu_si128((__m128i const*)S2);
warning: [email protected]:       |                                           ^
warning: [email protected]: C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(436,13): error: unknown type name '__m128i'
warning: [email protected]:   436 |             __m128i V1 = _mm_loadu_si64(S1);
warning: [email protected]:       |             ^
warning: [email protected]: C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(436,26): error: use of undeclared identifier '_mm_loadu_si64'
warning: [email protected]:   436 |             __m128i V1 = _mm_loadu_si64(S1);
warning: [email protected]:       |                          ^
warning: [email protected]: C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(437,13): error: unknown type name '__m128i'
warning: [email protected]:   437 |             __m128i V2 = _mm_loadu_si64(S2);
warning: [email protected]:       |             ^
warning: [email protected]: C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(437,26): error: use of undeclared identifier '_mm_loadu_si64'
warning: [email protected]:   437 |             __m128i V2 = _mm_loadu_si64(S2);
warning: [email protected]: 14 errors generated.
error: failed to run custom build command for `rustc_llvm v0.0.0 (D:\a\rust\rust\compiler\rustc_llvm)`

Caused by:
Caused by:
  process didn't exit successfully: `D:\a\rust\rust\build\i686-pc-windows-msvc\stage0-rustc\release\build\rustc_llvm-3340b85b19977e1c\build-script-build` (exit code: 1)
  --- stdout
  cargo:rustc-check-cfg=cfg(llvm_component,values("ipo"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("bitreader"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("bitwriter"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("linker"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("asmparser"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("lto"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("coverage"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("instrumentation"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("x86"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("arm"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("aarch64"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("amdgpu"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("avr"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("loongarch"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("m68k"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("csky"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("mips"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("powerpc"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("systemz"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("jsbackend"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("webassembly"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("msp430"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("sparc"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("nvptx"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("hexagon"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("riscv"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("xtensa"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("bpf"))
  cargo:rerun-if-env-changed=RUST_CHECK
  cargo:rerun-if-env-changed=REAL_LIBRARY_PATH_VAR
  cargo:rerun-if-env-changed=REAL_LIBRARY_PATH
  cargo:rerun-if-env-changed=LLVM_CONFIG
  cargo:rerun-if-changed=D:\a\rust\rust\build\i686-pc-windows-msvc\llvm\bin\llvm-config.exe
  cargo:rustc-cfg=llvm_component="aarch64"
  cargo:rustc-cfg=llvm_component="amdgpu"
  cargo:rustc-cfg=llvm_component="arm"
  cargo:rustc-cfg=llvm_component="asmparser"
  cargo:rustc-cfg=llvm_component="avr"
  cargo:rustc-cfg=llvm_component="bitreader"
  cargo:rustc-cfg=llvm_component="bitwriter"
  cargo:rustc-cfg=llvm_component="bpf"
  cargo:rustc-cfg=llvm_component="coverage"
  cargo:rustc-cfg=llvm_component="csky"
  cargo:rustc-cfg=llvm_component="hexagon"
  cargo:rustc-cfg=llvm_component="instrumentation"
  cargo:rustc-cfg=llvm_component="ipo"
  cargo:rustc-cfg=llvm_component="linker"
  cargo:rustc-cfg=llvm_component="loongarch"
  cargo:rustc-cfg=llvm_component="lto"
  cargo:rustc-cfg=llvm_component="m68k"
  cargo:rustc-cfg=llvm_component="mips"
  cargo:rustc-cfg=llvm_component="msp430"
  cargo:rustc-cfg=llvm_component="nvptx"
  cargo:rustc-cfg=llvm_component="powerpc"
  cargo:rustc-cfg=llvm_component="riscv"
  cargo:rustc-cfg=llvm_component="sparc"
  cargo:rustc-cfg=llvm_component="systemz"
  cargo:rustc-cfg=llvm_component="webassembly"
  cargo:rustc-cfg=llvm_component="x86"
  cargo:rustc-cfg=llvm_component="xtensa"
  cargo:rerun-if-env-changed=LLVM_ENZYME
  cargo:rerun-if-env-changed=LLVM_RUSTLLVM
  cargo:rerun-if-env-changed=LLVM_ASSERTIONS
  cargo:rerun-if-changed=llvm-wrapper\SymbolWrapper.cpp
  cargo:rerun-if-changed=llvm-wrapper\SuppressLLVMWarnings.h
  cargo:rerun-if-changed=llvm-wrapper\RustWrapper.cpp
  cargo:rerun-if-changed=llvm-wrapper\README
  cargo:rerun-if-changed=llvm-wrapper\PassWrapper.cpp
  cargo:rerun-if-changed=llvm-wrapper\LLVMWrapper.h
  cargo:rerun-if-changed=llvm-wrapper\Linker.cpp
  cargo:rerun-if-changed=llvm-wrapper\CoverageMappingWrapper.cpp
  cargo:rerun-if-changed=llvm-wrapper\ArchiveWrapper.cpp
  cargo:rerun-if-changed=llvm-wrapper\.editorconfig
  OUT_DIR = Some(D:\a\rust\rust\build\i686-pc-windows-msvc\stage0-rustc\i686-pc-windows-msvc\release\build\rustc_llvm-ebdc380be79e4699\out)
  TARGET = Some(i686-pc-windows-msvc)
  cargo:rerun-if-env-changed=VCINSTALLDIR
  VCINSTALLDIR = None
  VCINSTALLDIR = None
  cargo:rerun-if-env-changed=VSTEL_MSBuildProjectFullPath
  VSTEL_MSBuildProjectFullPath = None
  cargo:rerun-if-env-changed=VSCMD_ARG_VCVARS_SPECTRE
  VSCMD_ARG_VCVARS_SPECTRE = None
  cargo:rerun-if-env-changed=WindowsSdkDir
  WindowsSdkDir = None
  cargo:rerun-if-env-changed=WindowsSDKVersion
  WindowsSDKVersion = None
  cargo:rerun-if-env-changed=LIB
  LIB = None
  PATH = Some(C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\runneradmin\bin;D:\a\rust\rust\ninja;D:\a\rust\rust\sccache;C:\Program Files\MongoDB\Server\5.0\bin;C:\aliyun-cli;C:\vcpkg;C:\Program Files (x86)\NSIS;C:\tools\zstd;C:\Program Files\Mercurial;C:\hostedtoolcache\windows\stack\3.3.1\x64;C:\cabal\bin;C:\ghcup\bin;C:\mingw64\bin;C:\Program Files\dotnet;C:\Program Files\MySQL\MySQL Server 8.0\bin;C:\Program Files\R\R-4.4.2\bin\x64;C:\SeleniumWebDrivers\GeckoDriver;C:\SeleniumWebDrivers\EdgeDriver;C:\SeleniumWebDrivers\ChromeDriver;C:\Program Files (x86)\sbt\bin;C:\Program Files (x86)\GitHub CLI;C:\Program Files\Git\usr\bin;C:\Program Files (x86)\pipx_bin;C:\npm\prefix;C:\hostedtoolcache\windows\go\1.21.13\x64\bin;C:\hostedtoolcache\windows\Python\3.9.13\x64\Scripts;C:\hostedtoolcache\windows\Python\3.9.13\x64;C:\hostedtoolcache\windows\Ruby\3.0.7\x64\bin;C:\Program Files\OpenSSL\bin;C:\tools\kotlinc\bin;C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\8.0.442-6\x64\bin;C:\Program Files\ImageMagick-7.1.1-Q16-HDRI;C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin;C:\ProgramData\kind;C:\ProgramData\Chocolatey\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\dotnet;C:\Program Files\PowerShell\7;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\Tools\Binn;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files (x86)\WiX Toolset v3.14\bin;C:\Program Files\Microsoft SQL Server\130\DTS\Binn;C:\Program Files\Microsoft SQL Server\140\DTS\Binn;C:\Program Files\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\Microsoft SQL Server\160\DTS\Binn;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\ProgramData\chocolatey\lib\pulumi\tools\Pulumi\bin;C:\Program Files\CMake\bin;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.9.9\bin;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\GitHub CLI;C:\tools\php;C:\Program Files (x86)\sbt\bin;C:\Program Files\Amazon\AWSCLIV2;C:\Program Files\Amazon\SessionManagerPlugin\bin;C:\Program Files\Amazon\AWSSAMCLI\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\LLVM\bin;C:\Users\runneradmin\.dotnet\tools;C:\Users\runneradmin\.cargo\bin;C:\Users\runneradmin\AppData\Local\Microsoft\WindowsApps)
  cargo:rerun-if-env-changed=INCLUDE
  INCLUDE = None
  HOST = Some(i686-pc-windows-msvc)
  cargo:rerun-if-env-changed=CXX_i686-pc-windows-msvc
  CXX_i686-pc-windows-msvc = None
  cargo:rerun-if-env-changed=CXX_i686_pc_windows_msvc
  CXX_i686_pc_windows_msvc = None
  cargo:rerun-if-env-changed=HOST_CXX
  cargo:rerun-if-env-changed=CXX
  CXX = Some(D:/a/rust/rust/citools/clang-rust/bin/clang-cl.exe)
  RUSTC_WRAPPER = Some(D:\a\rust\rust\build\bootstrap\debug\rustc)
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some(crt-static,fxsr,sse,sse2,x87)
  cargo:rerun-if-env-changed=CXXFLAGS_i686-pc-windows-msvc
  CXXFLAGS_i686-pc-windows-msvc = None
  cargo:rerun-if-env-changed=CXXFLAGS_i686_pc_windows_msvc
  CXXFLAGS_i686_pc_windows_msvc = None
  CXXFLAGS_i686_pc_windows_msvc = None
  cargo:rerun-if-env-changed=HOST_CXXFLAGS
  HOST_CXXFLAGS = None
  cargo:rerun-if-env-changed=CXXFLAGS
  CXXFLAGS = None
  CARGO_ENCODED_RUSTFLAGS = Some(--cfg=bootstrap--cfg=windows_raw_dylib-Csymbol-mangling-version=v0-Zunstable-options--check-cfg=cfg(bootstrap)--check-cfg=cfg(llvm_enzyme)-Zmacro-backtrace-Csplit-debuginfo=packed-Ctarget-feature=+crt-static-Wrustc::internal-Drustc::symbol_intern_string_literal-Wkeyword_idents_2024-Wunsafe_op_in_unsafe_fn-Alinker-messages-Zon-broken-pipe=kill)
  cargo:warning=In file included from llvm-wrapper/PassWrapper.cpp:1:
  cargo:warning=In file included from llvm-wrapper\LLVMWrapper.h:7:
  cargo:warning=In file included from D:\a\rust\rust\build\i686-pc-windows-msvc\llvm\include\llvm/Support/raw_ostream.h:16:
  cargo:warning=In file included from D:\a\rust\rust\build\i686-pc-windows-msvc\llvm\include\llvm/ADT/SmallVector.h:18:
  cargo:warning=In file included from C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\algorithm:10:
  cargo:warning=In file included from C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\__msvc_heap_algorithms.hpp:11:
  cargo:warning=In file included from C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\xutility:15:
  cargo:warning=In file included from C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\cwchar:12:
  cargo:warning=C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(294,13): error: unknown type name '__m128i'
  cargo:warning=  294 |             __m128i V2 = _mm_set1_epi16((short)_C);
  cargo:warning=      |             ^
  cargo:warning=C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(294,26): error: use of undeclared identifier '_mm_set1_epi16'
  cargo:warning=  294 |             __m128i V2 = _mm_set1_epi16((short)_C);
  cargo:warning=      |                          ^
  cargo:warning=C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(298,17): error: unknown type name '__m128i'
  cargo:warning=  298 |                 __m128i V1 = _mm_loadu_si128((__m128i const*)S);
  cargo:warning=      |                 ^
  cargo:warning=C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(298,47): error: use of undeclared identifier '__m128i'
  cargo:warning=  298 |                 __m128i V1 = _mm_loadu_si128((__m128i const*)S);
  cargo:warning=      |                                               ^
  cargo:warning=C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(313,17): error: unknown type name '__m128i'
  cargo:warning=  313 |                 __m128i V1 = _mm_loadu_si64(S);
  cargo:warning=      |                 ^
  cargo:warning=C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(313,30): error: use of undeclared identifier '_mm_loadu_si64'
  cargo:warning=  313 |                 __m128i V1 = _mm_loadu_si64(S);
  cargo:warning=      |                              ^
  cargo:warning=C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(418,13): error: unknown type name '__m128i'
  cargo:warning=  418 |             __m128i V1 = _mm_loadu_si128((__m128i const*)S1);
  cargo:warning=      |             ^
  cargo:warning=C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(418,43): error: use of undeclared identifier '__m128i'
  cargo:warning=  418 |             __m128i V1 = _mm_loadu_si128((__m128i const*)S1);
  cargo:warning=      |                                           ^
  cargo:warning=C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(419,13): error: unknown type name '__m128i'
  cargo:warning=  419 |             __m128i V2 = _mm_loadu_si128((__m128i const*)S2);
  cargo:warning=      |             ^
  cargo:warning=C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(419,43): error: use of undeclared identifier '__m128i'
  cargo:warning=  419 |             __m128i V2 = _mm_loadu_si128((__m128i const*)S2);
  cargo:warning=      |                                           ^
  cargo:warning=C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(436,13): error: unknown type name '__m128i'
  cargo:warning=  436 |             __m128i V1 = _mm_loadu_si64(S1);
  cargo:warning=      |             ^
  cargo:warning=C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(436,26): error: use of undeclared identifier '_mm_loadu_si64'
  cargo:warning=  436 |             __m128i V1 = _mm_loadu_si64(S1);
  cargo:warning=      |                          ^
  cargo:warning=C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(437,13): error: unknown type name '__m128i'
  cargo:warning=  437 |             __m128i V2 = _mm_loadu_si64(S2);
  cargo:warning=      |             ^
  cargo:warning=C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(437,26): error: use of undeclared identifier '_mm_loadu_si64'
  cargo:warning=  437 |             __m128i V2 = _mm_loadu_si64(S2);
  cargo:warning=      |                          ^
  cargo:warning=14 errors generated.
  --- stderr



  error occurred in cc-rs: Command "D:/a/rust/rust/citools/clang-rust/bin/clang-cl.exe" "-nologo" "-MT" "-O2" "-Brepro" "-m32" "-arch:IA32" "-ID:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\llvm\\include" "-std:c++17" "/EHs-c-" "/GR-" "-D_GLIBCXX_ASSERTIONS" "-D_LARGEFILE_SOURCE" "-D_FILE_OFFSET_BITS=64" "-D_CRT_SECURE_NO_DEPRECATE" "-D_CRT_SECURE_NO_WARNINGS" "-D_CRT_NONSTDC_NO_DEPRECATE" "-D_CRT_NONSTDC_NO_WARNINGS" "-D_SCL_SECURE_NO_DEPRECATE" "-D_SCL_SECURE_NO_WARNINGS" "-DUNICODE" "-D_UNICODE" "-D__STDC_CONSTANT_MACROS" "-D__STDC_FORMAT_MACROS" "-D__STDC_LIMIT_MACROS" "-DLLVM_COMPONENT_AARCH64" "-DLLVM_COMPONENT_AMDGPU" "-DLLVM_COMPONENT_ARM" "-DLLVM_COMPONENT_ASMPARSER" "-DLLVM_COMPONENT_AVR" "-DLLVM_COMPONENT_BITREADER" "-DLLVM_COMPONENT_BITWRITER" "-DLLVM_COMPONENT_BPF" "-DLLVM_COMPONENT_COVERAGE" "-DLLVM_COMPONENT_CSKY" "-DLLVM_COMPONENT_HEXAGON" "-DLLVM_COMPONENT_INSTRUMENTATION" "-DLLVM_COMPONENT_IPO" "-DLLVM_COMPONENT_LINKER" "-DLLVM_COMPONENT_LOONGARCH" "-DLLVM_COMPONENT_LTO" "-DLLVM_COMPONENT_M68K" "-DLLVM_COMPONENT_MIPS" "-DLLVM_COMPONENT_MSP430" "-DLLVM_COMPONENT_NVPTX" "-DLLVM_COMPONENT_POWERPC" "-DLLVM_COMPONENT_RISCV" "-DLLVM_COMPONENT_SPARC" "-DLLVM_COMPONENT_SYSTEMZ" "-DLLVM_COMPONENT_WEBASSEMBLY" "-DLLVM_COMPONENT_X86" "-DLLVM_COMPONENT_XTENSA" "-DLLVM_RUSTLLVM" "-FoD:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\stage0-rustc\\i686-pc-windows-msvc\\release\\build\\rustc_llvm-ebdc380be79e4699\\out\\ef10e86dc40538c1-PassWrapper.o" "-c" "--" "llvm-wrapper/PassWrapper.cpp" with args clang-cl.exe did not execute successfully (status code exit code: 1).

warning: build failed, waiting for other jobs to finish...
[RUSTC-TIMING] rustc_ty_utils test:false 61.120
[RUSTC-TIMING] rustc_trait_selection test:false 195.461
[RUSTC-TIMING] rustc_trait_selection test:false 195.461
[RUSTC-TIMING] rustc_lint test:false 126.592
Build completed unsuccessfully in 0:22:33
make: *** [Makefile:111: ci-msvc-py] Error 1
  network time: Thu, 27 Feb 2025 05:20:38 GMT
##[error]Process completed with exit code 2.
Post job cleanup.
[command]"C:\Program Files\Git\bin\git.exe" version

@bors
Copy link
Contributor

bors commented Feb 27, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 27, 2025
@yotamofek
Copy link
Contributor Author

The failure doesn't really look like it has anything to do with my PR...
Anyone got an idea?

@Kobzol
Copy link
Contributor

Kobzol commented Feb 27, 2025

See https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/spurious.20.28.3F.29.20i686.20msvc.20errors, it looks spurious.

@yotamofek
Copy link
Contributor Author

Thanks for the quick reply!
Good luck with pinning that one down 😅

@fmease
Copy link
Member

fmease commented Feb 27, 2025

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 27, 2025
@jieyouxu
Copy link
Member

jieyouxu commented Mar 2, 2025

@bors p=5 (encouraging more rollup-nevers to go through before more rollups)

@bors
Copy link
Contributor

bors commented Mar 2, 2025

⌛ Testing commit 479116e with merge 7c4a55c...

@bors
Copy link
Contributor

bors commented Mar 2, 2025

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing 7c4a55c to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 2, 2025
@bors bors merged commit 7c4a55c into rust-lang:master Mar 2, 2025
7 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Mar 2, 2025
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (7c4a55c): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.6% [-1.2%, -0.2%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.6% [-1.2%, -0.2%] 4

Max RSS (memory usage)

Results (primary -7.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-7.0% [-7.0%, -7.0%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -7.0% [-7.0%, -7.0%] 1

Cycles

Results (primary 0.9%, secondary 5.1%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.9% [0.9%, 0.9%] 1
Regressions ❌
(secondary)
5.1% [3.1%, 6.1%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.9% [0.9%, 0.9%] 1

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 774.29s -> 774.434s (0.02%)
Artifact size: 361.94 MiB -> 361.97 MiB (0.01%)

@yotamofek yotamofek deleted the pr/rustdoc/return-impl-display-redux branch March 3, 2025 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants