| Age | Commit message (Collapse) | Author | Lines |
|
"how much to trust" implies the opposite
|
|
|
|
|
|
Update table of contents in about-this-guide.md
|
|
1. added two new parts: Bootstrapping and Supporting Infrastructure;
2. touched up names of pre-existing parts, to match actual names in sidebar;
3. syntactic nits (start description of Analysis with a capital letter); and
4. make numbered list use only 1.
Co-authored-by: Tshepang Mbambo <tshepang@gmail.com>
|
|
|
|
|
|
|
|
|
|
Weekly `cargo update`
Automation to keep dependencies in `Cargo.lock` current.
The following is the output from `cargo update`:
```txt
compiler & tools dependencies:
Locking 11 packages to latest compatible versions
Updating blake3 v1.8.0 -> v1.8.1
Updating ctrlc v3.4.5 -> v3.4.6
Updating env_logger v0.11.7 -> v0.11.8
Updating errno v0.3.10 -> v0.3.11
Updating flate2 v1.1.0 -> v1.1.1
Updating indexmap v2.8.0 -> v2.9.0
Updating miniz_oxide v0.8.5 -> v0.8.7
Updating openssl-sys v0.9.106 -> v0.9.107
Updating redox_syscall v0.5.10 -> v0.5.11
Updating smallvec v1.14.0 -> v1.15.0
Updating tokio v1.44.1 -> v1.44.2
note: pass `--verbose` to see 40 unchanged dependencies behind latest
library dependencies:
Locking 1 package to latest compatible version
Updating miniz_oxide v0.8.5 -> v0.8.7
note: pass `--verbose` to see 4 unchanged dependencies behind latest
rustbook dependencies:
Locking 30 packages to latest compatible versions
Updating cc v1.2.17 -> v1.2.18
Updating clap v4.5.32 -> v4.5.35
Updating clap_builder v4.5.32 -> v4.5.35
Updating darling v0.20.10 -> v0.20.11
Updating darling_core v0.20.10 -> v0.20.11
Updating darling_macro v0.20.10 -> v0.20.11
Updating env_logger v0.11.7 -> v0.11.8
Updating errno v0.3.10 -> v0.3.11
Updating flate2 v1.1.0 -> v1.1.1
Updating iana-time-zone v0.1.61 -> v0.1.63
Updating icu_locid_transform_data v1.5.0 -> v1.5.1
Updating icu_normalizer_data v1.5.0 -> v1.5.1
Updating icu_properties_data v1.5.0 -> v1.5.1
Updating indexmap v2.8.0 -> v2.9.0
Updating log v0.4.26 -> v0.4.27
Updating miniz_oxide v0.8.5 -> v0.8.7
Updating once_cell v1.21.1 -> v1.21.3
Updating pest v2.7.15 -> v2.8.0
Updating pest_derive v2.7.15 -> v2.8.0
Updating pest_generator v2.7.15 -> v2.8.0
Updating pest_meta v2.7.15 -> v2.8.0
Updating redox_syscall v0.5.10 -> v0.5.11
Updating rustix v1.0.3 -> v1.0.5
Updating smallvec v1.14.0 -> v1.15.0
Updating string_cache v0.8.8 -> v0.8.9
Updating windows-core v0.52.0 -> v0.61.0
Adding windows-implement v0.60.0
Adding windows-interface v0.59.1
Adding windows-result v0.3.2
Adding windows-strings v0.4.0
```
|
|
Rollup of 6 pull requests
Successful merges:
- #138562 (Optimize slice {Chunks,Windows}::nth)
- #138876 (Trusty: Implement `write_vectored` for stdio )
- #139072 (Add `slice::align_to_uninit_mut`)
- #139367 (Add `*_value` methods to proc_macro lib)
- #139391 (Check if merged attributes list is empty in expr)
- #139414 (Fix typo in `RawList`'s documentation)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Add `*_value` methods to proc_macro lib
This is the (re-)implementation of https://github.com/rust-lang/libs-team/issues/459.
It allows to get the actual value (unescaped) of the different string literals.
It was originally done in https://github.com/rust-lang/rust/pull/136355 but it broke the artifacts build so we decided to move the crate to crates.io to go around this limitation.
Part of https://github.com/rust-lang/rust/issues/136652.
Considering this is a copy-paste of the originally approved PR, no need to go through the whole process again. \o/
r? `@Urgau`
|
|
Update cargo
17 commits in a6c604d1b8a2f2a8ff1f3ba6092f9fda42f4b7e9..0e93c5bf6a1d5ee7bc2af63d1afb16cd28793601
2025-03-26 18:11:00 +0000 to 2025-04-05 00:00:24 +0000
- chore(deps): bump openssl from 0.10.71 to 0.10.72 (rust-lang/cargo#15394)
- chore(ci): restore cargo-util semver check (rust-lang/cargo#15389)
- docs(changelog): polish changelog items (rust-lang/cargo#15379)
- chore(deps): update msrv (1 version) to v1.86 (rust-lang/cargo#15381)
- chore: add aarch64 linux runner (rust-lang/cargo#15077)
- Added `build_directory` field to cargo metadata output (rust-lang/cargo#15377)
- chore(deps): update rust crate rusqlite to 0.34.0 (rust-lang/cargo#15373)
- Prevent undeclared public network access (rust-lang/cargo#15368)
- rename the `author` field to be `authors` in book.toml (rust-lang/cargo#15362)
- move modules from kebab-case to snake_case (rust-lang/cargo#14439)
- chore: bump to 0.89.0; update changelog (rust-lang/cargo#15372)
- docs(unstable): update `-Zrustdoc-depinfo` tracking issue link (rust-lang/cargo#15371)
- fix(tree): Make output more deterministic (rust-lang/cargo#15369)
- feat: rustdoc depinfo rebuild detection via -Zrustdoc-depinfo (rust-lang/cargo#15359)
- Rename the gc config table (rust-lang/cargo#15367)
- Revert "Temporarily ignore cargo_test_doctest_xcompile_ignores" (rust-lang/cargo#15357)
- Don't canonicalize executable path in `cargo_exe` (rust-lang/cargo#15355)
r? ghost
|
|
|
|
Only build `rust_test_helpers` for `{incremental,ui}` test suites
Only build `rust_test_helpers` for `{incremental,ui}` test suites.
Context: Trying to see what test suites actually need `rust_test_helpers`, because this was causing unnecessary local failures when trying to run `./x test tests/run-make --target=wasm32-unknown-unknown` when `run-make` tests don't need `rust_test_helpers` at all.
r? `@ghost`
try-job: armhf-gnu
try-job: test-various
try-job: x86_64-apple-1
try-job: aarch64-apple
try-job: x86_64-msvc-1
try-job: i686-msvc-1
try-job: x86_64-mingw-1
try-job: i686-mingw-1
|
|
tidy: Fix paths to `coretests` and `alloctests`
Following `#135937` and `#136642`, tests for core and alloc are in coretests and alloctests. Fix tidy to lint for the new paths. Also, update comments referring to the old locations.
Some context for changes which don't match that pattern:
- `library/std/src/thread/local/dynamic_tests.rs` and `library/std/src/sync/mpsc/sync_tests.rs` were moved under `library/std/tests/` in 332fb7e6f1d (Move std::thread_local unit tests to integration tests, 2025-01-17) and b8ae372e483 (Move std::sync unit tests to integration tests, 2025-01-17), respectively, so are no longer special cases.
- There never was a `library/core/tests/fmt.rs` file. That comment previously referred to `src/test/ui/ifmt.rs`, which was folded into `library/alloc/tests/fmt.rs` in 949c96660c3 (move format! interface tests, 2020-09-08).
Now, the only matches for `(alloc|core)/tests` are in `compiler/rustc_codegen_{cranelift,gcc}/patches`. I don't know why CI hasn't broken because those patches can't apply. Or maybe they somehow still can apply?
r? `@bjorn3`
|
|
|
|
compiler & tools dependencies:
Locking 11 packages to latest compatible versions
Updating blake3 v1.8.0 -> v1.8.1
Updating ctrlc v3.4.5 -> v3.4.6
Updating env_logger v0.11.7 -> v0.11.8
Updating errno v0.3.10 -> v0.3.11
Updating flate2 v1.1.0 -> v1.1.1
Updating indexmap v2.8.0 -> v2.9.0
Updating miniz_oxide v0.8.5 -> v0.8.7
Updating openssl-sys v0.9.106 -> v0.9.107
Updating redox_syscall v0.5.10 -> v0.5.11
Updating smallvec v1.14.0 -> v1.15.0
Updating tokio v1.44.1 -> v1.44.2
note: pass `--verbose` to see 40 unchanged dependencies behind latest
library dependencies:
Locking 1 package to latest compatible version
Updating miniz_oxide v0.8.5 -> v0.8.7
note: pass `--verbose` to see 4 unchanged dependencies behind latest
rustbook dependencies:
Locking 30 packages to latest compatible versions
Updating cc v1.2.17 -> v1.2.18
Updating clap v4.5.32 -> v4.5.35
Updating clap_builder v4.5.32 -> v4.5.35
Updating darling v0.20.10 -> v0.20.11
Updating darling_core v0.20.10 -> v0.20.11
Updating darling_macro v0.20.10 -> v0.20.11
Updating env_logger v0.11.7 -> v0.11.8
Updating errno v0.3.10 -> v0.3.11
Updating flate2 v1.1.0 -> v1.1.1
Updating iana-time-zone v0.1.61 -> v0.1.63
Updating icu_locid_transform_data v1.5.0 -> v1.5.1
Updating icu_normalizer_data v1.5.0 -> v1.5.1
Updating icu_properties_data v1.5.0 -> v1.5.1
Updating indexmap v2.8.0 -> v2.9.0
Updating log v0.4.26 -> v0.4.27
Updating miniz_oxide v0.8.5 -> v0.8.7
Updating once_cell v1.21.1 -> v1.21.3
Updating pest v2.7.15 -> v2.8.0
Updating pest_derive v2.7.15 -> v2.8.0
Updating pest_generator v2.7.15 -> v2.8.0
Updating pest_meta v2.7.15 -> v2.8.0
Updating redox_syscall v0.5.10 -> v0.5.11
Updating rustix v1.0.3 -> v1.0.5
Updating smallvec v1.14.0 -> v1.15.0
Updating string_cache v0.8.8 -> v0.8.9
Updating windows-core v0.52.0 -> v0.61.0
Adding windows-implement v0.60.0
Adding windows-interface v0.59.1
Adding windows-result v0.3.2
Adding windows-strings v0.4.0
|
|
Following `#135937` and `#136642`, tests for core and alloc are in
coretests and alloctests. Fix tidy to lint for the new paths. Also,
update comments referring to the old locations.
Some context for changes which don't match that pattern:
* library/std/src/thread/local/dynamic_tests.rs and
library/std/src/sync/mpsc/sync_tests.rs were moved under
library/std/tests/ in 332fb7e6f1d (Move std::thread_local unit tests
to integration tests, 2025-01-17) and b8ae372e483 (Move std::sync unit
tests to integration tests, 2025-01-17), respectively, so are no
longer special cases.
* There never was a library/core/tests/fmt.rs file. That comment
previously referred to src/test/ui/ifmt.rs, which was folded into
library/alloc/tests/fmt.rs in 949c96660c3 (move format! interface
tests, 2020-09-08).
|
|
|
|
|
|
Move `fd` into `std::sys`
Move platform definitions of `fd` into `std::sys`, as part of https://github.com/rust-lang/rust/issues/117276.
Unlike other modules directly under `std::sys`, this is only available on some platforms and I have not provided a fallback abstraction for unsupported platforms. That is similar to how `std::os::fd` is gated to only supported platforms.
Also, fix the `unsafe_op_in_unsafe_fn` lint, which was allowed for the Unix fd impl. Since macro expansions from `std::sys::pal::unix::weak` trigger this lint, fix it there too.
cc `@joboet,` `@ChrisDenton`
try-job: x86_64-gnu-aux
|
|
|
|
r=notriddle
Rustdoc: typecheck settings.js
This makes the file fully typechecked with no instances of ``````@ts-expect-error`````` and no type casts.
r? `````@notriddle`````
|
|
Allow optimizing out `panic_bounds_check` in Unicode checks.
Allow optimizing out `panic_bounds_check` in Unicode checks.
For context, see https://github.com/japaric/ufmt/issues/52#issuecomment-2699207241.
|
|
Expose algebraic floating point intrinsics
# Problem
A stable Rust implementation of a simple dot product is 8x slower than C++ on modern x86-64 CPUs. The root cause is an inability to let the compiler reorder floating point operations for better vectorization.
See https://github.com/calder/dot-bench for benchmarks. Measurements below were performed on a i7-10875H.
### C++: 10us ✅
With Clang 18.1.3 and `-O2 -march=haswell`:
<table>
<tr>
<th>C++</th>
<th>Assembly</th>
</tr>
<tr>
<td>
<pre lang="cc">
float dot(float *a, float *b, size_t len) {
#pragma clang fp reassociate(on)
float sum = 0.0;
for (size_t i = 0; i < len; ++i) {
sum += a[i] * b[i];
}
return sum;
}
</pre>
</td>
<td>
<img src="https://github.com/user-attachments/assets/739573c0-380a-4d84-9fd9-141343ce7e68" />
</td>
</tr>
</table>
### Nightly Rust: 10us ✅
With rustc 1.86.0-nightly (8239a37f9) and `-C opt-level=3 -C target-feature=+avx2,+fma`:
<table>
<tr>
<th>Rust</th>
<th>Assembly</th>
</tr>
<tr>
<td>
<pre lang="rust">
fn dot(a: &[f32], b: &[f32]) -> f32 {
let mut sum = 0.0;
for i in 0..a.len() {
sum = fadd_algebraic(sum, fmul_algebraic(a[i], b[i]));
}
sum
}
</pre>
</td>
<td>
<img src="https://github.com/user-attachments/assets/9dcf953a-2cd7-42f3-bc34-7117de4c5fb9" />
</td>
</tr>
</table>
### Stable Rust: 84us ❌
With rustc 1.84.1 (e71f9a9a9) and `-C opt-level=3 -C target-feature=+avx2,+fma`:
<table>
<tr>
<th>Rust</th>
<th>Assembly</th>
</tr>
<tr>
<td>
<pre lang="rust">
fn dot(a: &[f32], b: &[f32]) -> f32 {
let mut sum = 0.0;
for i in 0..a.len() {
sum += a[i] * b[i];
}
sum
}
</pre>
</td>
<td>
<img src="https://github.com/user-attachments/assets/936a1f7e-33e4-4ff8-a732-c3cdfe068dca" />
</td>
</tr>
</table>
# Proposed Change
Add `core::intrinsics::f*_algebraic` wrappers to `f16`, `f32`, `f64`, and `f128` gated on a new `float_algebraic` feature.
# Alternatives Considered
https://github.com/rust-lang/rust/issues/21690 has a lot of good discussion of various options for supporting fast math in Rust, but is still open a decade later because any choice that opts in more than individual operations is ultimately contrary to Rust's design principles.
In the mean time, processors have evolved and we're leaving major performance on the table by not supporting vectorization. We shouldn't make users choose between an unstable compiler and an 8x performance hit.
# References
* https://github.com/rust-lang/rust/issues/21690
* https://github.com/rust-lang/libs-team/issues/532
* https://github.com/rust-lang/rust/issues/136469
* https://github.com/calder/dot-bench
* https://www.felixcloutier.com/x86/vfmadd132ps:vfmadd213ps:vfmadd231ps
try-job: x86_64-gnu-nopt
try-job: x86_64-gnu-aux
|
|
|
|
|
|
|
|
|
|
Use target-agnostic LLD flags in bootstrap for `use-lld`
[Before](https://github.com/rust-lang/rust/pull/135001), I hardcoded LLD flags that pretty much only worked on GNU. The right way is to use `-Zlinker-features` instead though.
I *think* that this should also make this work on Windows mingw, and thus `@petrochenkov's` workaround is no longer necessary.
Fixes: https://github.com/rust-lang/rust/issues/139372
Closes: https://github.com/rust-lang/rust/pull/139375
r? `@lqd`
|
|
unstable book: document tait
Documents the type alias impl trait feature.
Rendered:



because you are deeply involved in this I'll r you but feel free to reroll
r? `@oli-obk`
|
|
Fix 2024 edition doctest panic output
Fixes #137970.
The problem was that the output was actually displayed by rustc itself because we're exiting with `Result<(), String>`, and the display is really not great. So instead, we get the output, we print it and then we return an `ExitCode`.
r? ````@aDotInTheVoid````
|
|
|
|
Noratrieb:Now_I_am_become_death,_the_destroyer_of_i686-pc-windows-gnu, r=workingjubilee
Demote i686-pc-windows-gnu to Tier 2
In accordance with [RFC 3771](https://github.com/rust-lang/rfcs/pull/3771). FCP has been completed.
tracking issue #138422
I also added a stub doc page for the target and renamed the windows-gnullvm page for consistency.
|
|
|
|
Add helper function for checking LLD usage to `run-make-support`
Extracted out of https://github.com/rust-lang/rust/pull/138645, should be a simple refactoring.
r? ``@jieyouxu``
|
|
compiletest: Encapsulate all of the code that touches libtest
Compiletest currently relies on unstable libtest APIs in order to actually execute tests. That's unfortunate, but removing the dependency isn't trivial.
However, we can make a small step towards removing the libtest dependency by encapsulating the libtest interactions into a single dedicated module. That makes it easier to see what parts of libtest are actually used.
---
As a side-effect of moving the `test_opts` function into that dedicated module, this PR also ends up allowing `--fail-fast` to be passed on the command line, instead of requiring an environment variable.
---
There is still (at least) one other aspect of the libtest dependency that this PR does not address, namely the fact that we rely on libtest's output capture (via unstable std APIs) to capture the output that we print during individual tests. I hope to do something about that at some point.
r? jieyouxu
|
|
See https://rust-lang.github.io/mdBook/format/configuration/general.html#general-metadata
|
|
|
|
|
|
|
|
|
|
Remove unused variables generated in merged doctests
The variable is unused so no need to keep it around.
cc `@notriddle`
r? `@camelid`
|
|
impl !PartialOrd for HirId
revive of https://github.com/rust-lang/rust/pull/92233
Another checkbox of https://github.com/rust-lang/rust/issues/90317, another small step in making incremental less likely to die in horrible ways
|
|
Tighten up assignment operator representations.
This is step 3 of [MCP 831](https://github.com/rust-lang/compiler-team/issues/831).
r? `@spastorino`
|
|
|
|
Rollup of 7 pull requests
Successful merges:
- #139080 (Experimental feature gate for `super let`)
- #139145 (slice: Remove some uses of unsafe in first/last chunk methods)
- #139149 (unstable book: document import_trait_associated_functions)
- #139273 (Apply requested API changes to `cell_update`)
- #139282 (rustdoc: make settings checkboxes always square)
- #139283 (Rustc dev guide subtree update)
- #139294 (Fix the `f16`/`f128` feature gates on integer literals)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
|