Commit Graph

148864 Commits

Author SHA1 Message Date
Ed Page
6d93626351 docs(rustc): Help users to check-cfg Cargo docs 2024-06-12 15:20:58 -05:00
bors
b5b13568fb Auto merge of #126240 - matthiaskrgr:rollup-ks4o2n9, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #126063 (Remove some unused crate dependencies.)
 - #126115 (Fix ICE due to `unwrap` in `probe_for_name_many`)
 - #126159 (ScalarInt: size mismatches are a bug, do not delay the panic)
 - #126184 (interpret: do not ICE on padded non-pow2 SIMD vectors)
 - #126191 (Fix `NonZero` doctest inconsistencies)
 - #126211 (migrate tests/run-make/llvm-outputs to use rmake.rs)
 - #126212 (fix: build on haiku)
 - #126215 (Add explanatory note to async block type mismatch error)
 - #126223 (run-make: add `run_in_tmpdir` self-test)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-06-10 21:21:00 +00:00
bors
d402830c8a Auto merge of #125209 - Kobzol:rfl-ci, r=Mark-Simulacrum
Add Rust for Linux `auto` CI job

This PR adds an `auto` CI job that checks if Rust for Linux (RfL) still compiles with the latest version of the compiler and the standard library. If not, we should ideally ping the RfL ping group.

try-job: rfl
2024-06-10 19:13:10 +00:00
Matthias Krüger
61eb29e958
Rollup merge of #126211 - lolbinarycat:llvm-outputs-rmake, r=jieyouxu
migrate tests/run-make/llvm-outputs to use rmake.rs

part of #121876

<!--
If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.

This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using

    r​? <reviewer name>
-->
2024-06-10 21:12:26 +02:00
Matthias Krüger
07bb7ca9fa
Rollup merge of #126184 - RalfJung:interpret-simd-nonpow2, r=oli-obk
interpret: do not ICE on padded non-pow2 SIMD vectors

Fixes https://github.com/rust-lang/miri/issues/3458

r? ``@oli-obk``
2024-06-10 21:12:25 +02:00
Matthias Krüger
2d7f7ffba5
Rollup merge of #126159 - RalfJung:scalarint-size-mismatch, r=oli-obk
ScalarInt: size mismatches are a bug, do not delay the panic

Cc [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/146212-t-compiler.2Fconst-eval/topic/Why.20are.20ScalarInt.20to.20iN.2FuN.20methods.20fallible.3F)

r? ``@oli-obk``
2024-06-10 21:12:25 +02:00
Jakub Beránek
144760e236
CI: add Rust for Linux auto job 2024-06-10 14:31:21 +02:00
Ralf Jung
3c57ea0df7 ScalarInt: size mismatches are a bug, do not delay the panic 2024-06-10 13:43:16 +02:00
Jakub Beránek
faac70b66e
Update rustc-perf submodule before running tidy 2024-06-10 12:41:52 +02:00
binarycat
91f5530b2d migrate tests/run-make/llvm-outputs to use rmake.rs
part of #121876
2024-06-10 05:30:58 -04:00
bors
06194cadcd Auto merge of #126206 - Kobzol:disable-libstdc++-version-check, r=Mark-Simulacrum
Remove libstdc++ version check error

This keeps the error message from https://github.com/rust-lang/rust/pull/125411, but removes the `exit(1)` call.

This PR is mostly a hotfix to unblock bootstrap benchmarks in rustc-perf.

However, I think that it might be better to just print a warning, in general. If the ABI version does not match, the build might or might not work locally (as we can see on rustc-perf, where it works even if the reported ABI is 7).

If it does not work (and **if** we can always recognize this during the LLVM wrapper build, instead of having some silent miscompilations), then the user will have to update their libstdc++ anyway, the error does not help them out on its own. So it should be enough to just provide a better error message, without blocking the build.

But I'm not adamant on that, I just want to unblock bootstrap benchmarks until we can find a way to update libstdc++ on the collector machine.

CC `@onur-ozkan`

r? `@Mark-Simulacrum`
2024-06-10 06:20:06 +00:00
bors
d2fb97fcec Auto merge of #126153 - onur-ozkan:fix-rustdoc-issue-with-ci-rustc, r=Mark-Simulacrum
resolve rustdoc incompatibility with `rust.download-rustc=true` + `rust.channel= beta/stable`

Previously, we were unable to use `rust.download-rustc` with the beta or stable
channel settings through `rust.channel` due to breaking rustdoc UI tests.
This was because when using a precompiled nightly compiler from CI, we must use the
channel of precompiled compiler and ignore `rust.channel` from the configuration.

This change addresses that issue in `Builder::doc_rust_lang_org_channel` and allows rustdoc
UI tests to work with the precompiled compiler even if the channel specified in config.toml is
"beta" or "stable".

Blocker for https://github.com/rust-lang/rust/pull/122709
2024-06-10 02:27:43 +00:00
bors
6d94a87275 Auto merge of #107099 - edward-shen:edward-shen/rustdoc-remap-path-prefix, r=GuillaumeGomez
rustdoc: Add support for --remap-path-prefix

Adds `--remap-path-prefix` as an unstable option. This is implemented to mimic the behavior of `rustc`'s `--remap-path-prefix`.

This flag similarly takes in two paths, a prefix to replace and a replacement string.

This is useful for build tools (e.g. Buck) other than cargo that can run doc tests.

cc: `@dtolnay`
2024-06-10 00:07:18 +00:00
bors
a70b2ae577 Auto merge of #126205 - jieyouxu:rollup-s64z5ng, r=jieyouxu
Rollup of 4 pull requests

Successful merges:

 - #126172 (Weekly `cargo update`)
 - #126176 (rustdoc-search: use lowercase, non-normalized name for type search)
 - #126190 (Autolabel run-make tests, remind to update tracking issue)
 - #126194 (Migrate more things to `WinError`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-06-09 21:03:04 +00:00
Jakub Beránek
5349476a03 Remove libstdc++ version check 2024-06-09 22:10:49 +02:00
许杰友 Jieyou Xu (Joe)
1fb4805341
Rollup merge of #126176 - notriddle:notriddle/fix-type-name-normalize, r=fmease
rustdoc-search: use lowercase, non-normalized name for type search

The type name ID map has underscores in its names, so the query element should have them, too.

Fixes #125993
2024-06-09 20:54:23 +01:00
许杰友 Jieyou Xu (Joe)
cbb986945b
Rollup merge of #126172 - clubby789:cargo-update, r=Mark-Simulacrum
Weekly `cargo update`

Replaces #125562

`r-efi` needs to be bumped in two places.
The `icu4x` dependencies also added a SPDX license identifer, so remove the license checking exception and add `Unicode-3.0` to the list.
2024-06-09 20:54:22 +01:00
onur-ozkan
99c5476edb remove the outdated incompatibility check
This check is no longer needed as rustdoc ui tests works with any
channel + precompiled compiler.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-06-09 22:49:32 +03:00
onur-ozkan
e61d3b8372 fix Builder::doc_rust_lang_org_channel
Previously, we were unable to use `rust.download-rustc` with the beta or stable
channel settings through `rust.channel` due to breaking rustdoc UI tests.
This was because when using a precompiled nightly compiler from CI, we must use the
channel of precompiled compiler and ignore `rust.channel` from the configuration.

This change addresses that issue in `Builder::doc_rust_lang_org_channel` and allows rustdoc
UI tests to work with the precompiled compiler even if the channel specified in config.toml is
"beta" or "stable".

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-06-09 22:48:56 +03:00
Michael Howell
8865b8c639 rustdoc-search: use lowercase, non-normalized name for type search
The type name ID map has underscores in its names, so the query
element should have them, too.
2024-06-09 11:56:52 -07:00
bors
503dfcf4e0 Auto merge of #126202 - jieyouxu:rollup-2ixnizz, r=jieyouxu
Rollup of 6 pull requests

Successful merges:

 - #125041 (Enable GVN for `AggregateKind::RawPtr`)
 - #125253 (Add `FRAC_1_SQRT_2PI` constant to f16/f32/f64/f128)
 - #125465 (bootstrap: vendor crates required by opt-dist to collect profiles )
 - #125470 (Add release notes for 1.79.0)
 - #125963 (Remove hard-coded hashes from codegen tests)
 - #126188 (Fix documentation for `impl_common_helpers` in `run-make-support`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-06-09 18:54:46 +00:00
许杰友 Jieyou Xu (Joe)
a8cba36cbf
Rollup merge of #126188 - Kobzol:runmake-command-docs, r=jieyouxu
Fix documentation for `impl_common_helpers` in `run-make-support`

Forgot to do this in https://github.com/rust-lang/rust/pull/126121.

`@bors` rollup

r? `@jieyouxu`
2024-06-09 19:16:21 +01:00
许杰友 Jieyou Xu (Joe)
4ca52f1869
Rollup merge of #125465 - weihanglo:opt-dist-vendor, r=Mark-Simulacrum
bootstrap: vendor crates required by opt-dist to collect profiles

These are the default package set required by opt-dist to correctly work,
hence for people wanting to build a production grade of rustc in a
sandboxed / air-gapped environment, these need to be vendored.

The size of `rustc-src-nightly.tar.xz` before and after this change:

* Before: 298M
* After: 323M (+8%)

Size change might or might not be a concern.
See the previous discussion: https://github.com/rust-lang/rust/pull/125166#issuecomment-2113626468

Previous efforts on making:

* https://github.com/rust-lang/rust/pull/125125
* https://github.com/rust-lang/rust/pull/125166

---

Note that extra works still need to be done to make it fully vendored.

* The current pinned rustc-perf uses `tempfile::Tempdir` as the working
  directory when collecting profiles from some of these packages.
  This "tmp" working directory usage make it impossible for Cargo to pick
  up the correct vendor sources setting in `.cargo/config.toml` bundled
  in the rustc-src tarball. [^1]
* opt-dist verifies the final built rustc against a subset of rustc test
  suite. However it rolls out its own `config.toml` without setting
  `vendor = true`, and that results in `./vendor/` directory removed.
  [^2]

[^1]: 4f313add60/collector/src/compile/benchmark/mod.rs (L164-L173)
[^2]: 606afbb617/src/tools/opt-dist/src/tests.rs (L62-L77)
2024-06-09 19:16:20 +01:00
Edward Shen
d9f78cb793
rustdoc: Add support for --remap-path-prefix
Adds --remap-path-prefix as an unstable option. This is implemented to
mimic the behavior of rustc's --remap-path-prefix but with minor
adjustments.

This flag similarly takes in two paths, a prefix to replace and a
replacement string.
2024-06-09 10:34:54 -07:00
bors
65d1a73aab Auto merge of #125999 - XrXr:dist-aarch64-gcc-13, r=Kobzol
ci: use GCC 13 as cross compiler in `dist-aarch64-linux`

I'm proposing this GCC upgrade since it addresses bug https://github.com/rust-lang/rust/issues/125619. The
regression in question affects stable release consumers who tend to have
no exposure to Rust build tools, so if at all possible, I would like to
have it resolved in the next stable release. I have tried to fix the bug
in `compiler-builtins`, which led to submitting a PR for `compiler-rt`
in upstream LLVM, but it may take a long time before these upstreams
address this regression.

A summary of why upgrading GCC solves the regression follows.
`__multc3()` is a builtin function `compiler-builtins` exposes for
specifically aarch64, non-Windows targets [1]. The object file for it is
included in `staticlib` archives through `libstd`. The implementation
for `__multc3()` is from `multc3.c`, part of LLVM's `compiler-rt`.
Upstream `compiler-rt` normally builds the C file using the Clang
from the same LLVM version. On the other hand, `compiler-builtins`
builds the C file using GCC, outside of the usual LLVM build system.
The upstream implementation doesn't have feature detection which
works for GCC version older than 10, and ends up producing an
unlinkable object.

Upstream LLVM might be slow to respond to this issue as they might deem
`compiler-builtin` as doing something out of the ordinary from their
perspective. They might reasonably assume everyone builds `compiler-rt`
through LLVM's build system.

I have done the following to test this change:
 - verified that a local build without this patch exhibits the
   regression.
 - verified that with this patch, the object for `__multc3()` has no
   reference to undefined functions in the symbol table.
 - verified that with this patch, `rustc` is usable to build Ruby with
   YJIT, and that the reported regression is resolved.

Since `loongarch64-linux-gnu` already uses GCC 13.2.0, I hope we can upgrade without issues.

try-job: dist-aarch64-linux

[1]: c04eb9e1af/build.rs (L524-L539)
2024-06-09 16:46:02 +00:00
Weihang Lo
377870386f
tidy: add license exceptions for rustc-perf
`ring` is included because it is an optional dependency of `hyper`,
which is a training data in rustc-pref for optimized build.
The license of it is generally `ISC AND MIT AND OpenSSL`,
though the `package.license` field is not set.

See https://github.com/briansmith/ring/issues/902

`git+https://github.com/rust-lang/team` git source is from
`rust_team_data`, which is used by `site` in src/tools/rustc-perf.
This doesn't really a part of the compiler,
so doesn't really affect the bootstrapping process.

See https://github.com/rust-lang/rustc-perf/pull/1914.
2024-06-09 12:33:11 -04:00
Weihang Lo
e24be071e3
feat: vendor crates required by opt-dist to collect profiles
These are the default package set required by opt-dist to correctly work,
hence for people wanting to build a production grade of rustc in a
sandboxed / air-gapped environment, these need to be vendored.

The size of `rustc-src-nightly.tar.xz` before and after this change:

* Before: 298M
* After: 323M (+8%)

These crates are the default set of packages required by opt-dist
to correctly work, hence for people wanting to build a production grade
of rustc in an sandboxed / air-gapped environment, these need to be vendored.

The size of `rustc-src-nightly.tar.xz` before and after this change:

* Before: 298M
* After: 323M (+8%)

Size change might or might not be a concern.
See the previous discussion: https://github.com/rust-lang/rust/pull/125166#issuecomment-2113626468

Previous efforts on making:

* https://github.com/rust-lang/rust/pull/125125
* https://github.com/rust-lang/rust/pull/125166

---

Note that extra works still need to be done to make it fully vendored.

* The current pinned rustc-perf uses `tempfile::Tempdir` as the working
  directory when collecting profiles from some of these packages.
  This "tmp" working directory usage make it impossible for Cargo to pick
  up the correct vendor sources setting in `.cargo/config.toml` bundled
  in the rustc-src tarball. [^1]
* opt-dist verifies the final built rustc against a subset of rustc test
  suite. However it rolls out its own `config.toml` without setting
  `vendor = true`, and that results in `./vendor/` directory removed.
  [^2]

[^1]: 4f313add60/collector/src/compile/benchmark/mod.rs (L164-L173)
[^2]: 606afbb617/src/tools/opt-dist/src/tests.rs (L62-L77)
2024-06-09 12:33:11 -04:00
bors
7bb0ef4902 Auto merge of #126193 - RalfJung:miri-sync, r=RalfJung
Miri subtree update

r? `@ghost`
2024-06-09 14:37:00 +00:00
tiif
69512c7b1e Follow up fix for eventfd shim 2024-06-09 19:44:06 +08:00
Ralf Jung
87c4d29ce2 don't panic if time computaton overflows 2024-06-09 13:07:36 +02:00
bors
509eec19c4 Auto merge of #3653 - tiif:bug/futex_ice, r=RalfJung
Fix futex with large timeout ICE

Fixes #3647.

This PR changed the type of ``nanoseconds`` from ``u64`` to ``u128``. In ``duration_since``, nanoseconds is manually converted to second by dividing it with 1e9. But overflow is still possible.
2024-06-09 10:18:56 +00:00
tiif
40182becc3 Run cargo fmt 2024-06-09 18:00:58 +08:00
tiif
21d66afb8f Saturate to u64::MAX 2024-06-09 18:00:58 +08:00
byt
e85c521f37 Checked add for duration update
Co-authored-by: Ralf Jung <post@ralfj.de>
2024-06-09 18:00:58 +08:00
byt
d0fb350b6a Add comment for u128 to u64 conversion.
Co-authored-by: Ralf Jung <post@ralfj.de>
2024-06-09 18:00:58 +08:00
tiif
aa8323585c Move duration division out 2024-06-09 18:00:58 +08:00
tiif
9cf04b5a22 Use modulo operation to convert nanosecond to Duration 2024-06-09 18:00:58 +08:00
tiif
9f60709ffd Remove test 2024-06-09 18:00:58 +08:00
tiif
0bca4e1a22 Convert u128 to nanosecond 2024-06-09 18:00:58 +08:00
tiif
844450ae3a First attempt 2024-06-09 18:00:58 +08:00
Ralf Jung
d5fb8257e7 interpret: do not ICE on padded non-pow2 SIMD vectors 2024-06-09 11:54:23 +02:00
Jakub Beránek
fbe5015480
Fix documentation for impl_common_helpers in run-make-support 2024-06-09 11:52:16 +02:00
Ralf Jung
ba45198c9b use strict ops in some places 2024-06-09 11:44:05 +02:00
Ralf Jung
110b092203 simd_bitmask: work correctly for sizes like 24 2024-06-09 11:44:05 +02:00
Matthias Krüger
8875fd1ff4
Rollup merge of #126175 - Kobzol:tidy-install-pip-quiet, r=tgross35
Use --quiet flag when installing pip dependencies

Fixes: https://github.com/rust-lang/rust/issues/126164

This still prints an error if any occurs.
2024-06-09 10:17:10 +02:00
Ralf Jung
91e53aa8ed simd_select_bitmask: fix intrinsic name in error 2024-06-09 09:56:30 +02:00
Ralf Jung
a13a9ab759 simd_bitmask: nicer error when the mask is too big 2024-06-09 09:09:23 +02:00
clubby789
dcd03aadd2 Update r-efi 2024-06-09 07:47:50 +01:00
clubby789
9d85dfc3e6 Update icu4x dependencies 2024-06-09 07:47:42 +01:00
Zalathar
5223bf4474 Remove empty test suite tests/run-make-fulldeps 2024-06-09 14:38:37 +10:00