about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-04-12remove implied textTshepang Mbambo-1/+1
"how much to trust" implies the opposite
2025-04-12ease copy-pasteTshepang Mbambo-2/+4
2025-04-12Update "crater" link to actually point to crater.mdFreya Arbjerg-1/+1
2025-04-11Merge pull request #2320 from smanilov/patch-1Tshepang Mbambo-14/+22
Update table of contents in about-this-guide.md
2025-04-11Update table of contents in about-this-guide.mdStan Manilov-14/+22
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>
2025-04-11Fix link to rustc_* TEST attributes in ui.mdStan Manilov-1/+1
2025-04-07improve flowTshepang Mbambo-2/+3
2025-04-07Merge from rustcThe rustc-dev-guide Cronjob Bot-580/+1032
2025-04-07Preparing for merge from rustcThe rustc-dev-guide Cronjob Bot-1/+1
2025-04-06Auto merge of #136077 - rust-lang:cargo_update, r=clubby789bors-53/+98
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 ```
2025-04-06Auto merge of #139452 - GuillaumeGomez:rollup-u9edkjo, r=GuillaumeGomezbors-22/+25
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
2025-04-06Rollup merge of #139367 - GuillaumeGomez:proc-macro-values, r=UrgauGuillaume Gomez-22/+25
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`
2025-04-06Auto merge of #139439 - weihanglo:update-cargo, r=weihanglobors-0/+0
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
2025-04-06Fix deadlink in libs-and-metadata.mdLevi Zim-1/+1
2025-04-06Rollup merge of #139347 - jieyouxu:rust_test_helpers, r=onur-ozkanStuart Cook-10/+9
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
2025-04-06Rollup merge of #139123 - thaliaarchi:core-alloc-test-paths, r=bjorn3Stuart Cook-19/+32
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`
2025-04-06Update cargoWeihang Lo-0/+0
2025-04-06cargo updategithub-actions-53/+98
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
2025-04-05tidy: Fix paths to coretests and alloctestsThalia Archibald-19/+32
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).
2025-04-05Update the minimum external LLVM to 19Josh Stone-106/+8
2025-04-05Clean up `rustc-literal-escaper` usage in rust-analyzerGuillaume Gomez-5/+3
2025-04-05Rollup merge of #139092 - thaliaarchi:move-fd-pal, r=joboetMatthias Krüger-2/+2
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
2025-04-04Move fd into sysThalia Archibald-2/+2
2025-04-05Rollup merge of #139274 - lolbinarycat:rustdoc-js-less-expect-error-part5, ↵Stuart Cook-46/+100
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`````
2025-04-05Rollup merge of #138024 - reitermarkus:unicode-panic-optimization, r=ibraheemdevStuart Cook-39/+98
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.
2025-04-05Rollup merge of #136457 - calder:master, r=tgross35Stuart Cook-4/+4
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
2025-04-04Expose algebraic floating point intrinsicsCalder Coalson-4/+4
2025-04-04Add `rustc-literal-escaper` to allowed crates listsGuillaume Gomez-0/+2
2025-04-04Update `rustc-literal-escaper` version to `0.0.2`Guillaume Gomez-4/+4
2025-04-04bootstrap: Only add `rustc_randomized_layouts` if the crate has itGuillaume Gomez-1/+1
2025-04-04Rollup merge of #139378 - Kobzol:bootstrap-use-lld-fix, r=petrochenkovMatthias Krüger-2/+2
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`
2025-04-04Rollup merge of #139339 - mejrs:tait, r=oli-obkMatthias Krüger-0/+159
unstable book: document tait Documents the type alias impl trait feature. Rendered: ![image](https://github.com/user-attachments/assets/1d904ff9-e1e1-4ef0-a62d-cbe2d480dce0) ![image](https://github.com/user-attachments/assets/9e877ad1-0f73-4ead-a4ac-0e106512cef8) ![image](https://github.com/user-attachments/assets/86663a23-9824-406d-a5e1-1e0c1662b5f5) because you are deeply involved in this I'll r you but feel free to reroll r? `@oli-obk`
2025-04-04Rollup merge of #139328 - GuillaumeGomez:fix-panic-output-137970, r=fmeaseMatthias Krüger-3/+5
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````
2025-04-04Use target-agnostic LLD flags in bootstrap for use-lldJakub Beránek-2/+2
2025-04-04Auto merge of #137869 - ↵bors-42/+45
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.
2025-04-04Remove usage of `rustc_lexer::unescape` in rust-analyzerGuillaume Gomez-18/+21
2025-04-04Rollup merge of #139322 - Kobzol:run-make-lld-refactor, r=jieyouxuMatthias Krüger-0/+37
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``
2025-04-04Rollup merge of #139317 - Zalathar:hide-libtest, r=jieyouxuMatthias Krüger-105/+208
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
2025-04-04Update book.toml fix the authors fieldGábor Szabó-1/+1
See https://rust-lang.github.io/mdBook/format/configuration/general.html#general-metadata
2025-04-04bootstrap: only build `rust_test_helpers` for `{incremental,ui}` suitesJieyou Xu-10/+9
2025-04-04Fix linksmejrs-4/+4
2025-04-04unstable book: document taitmejrs-0/+159
2025-04-03add some links about the rustdoc-gui test suitebinarycat-1/+5
2025-04-03Rollup merge of #139255 - GuillaumeGomez:unused-var-merged-doctest, r=fmeaseMatthias Krüger-1/+0
Remove unused variables generated in merged doctests The variable is unused so no need to keep it around. cc `@notriddle` r? `@camelid`
2025-04-03Rollup merge of #138610 - oli-obk:no-sort-hir-ids, r=compiler-errorsMatthias Krüger-33/+53
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
2025-04-03Rollup merge of #138017 - nnethercote:tighten-assignment-op, r=spastorinoMatthias Krüger-35/+62
Tighten up assignment operator representations. This is step 3 of [MCP 831](https://github.com/rust-lang/compiler-team/issues/831). r? `@spastorino`
2025-04-03Use `eprint!` instead of `eprintln!`Guillaume Gomez-1/+1
2025-04-03Auto merge of #139301 - matthiaskrgr:rollup-sa6ali8, r=matthiaskrgrbors-410/+568
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
2025-04-03Fix 2024 edition doctest panic outputGuillaume Gomez-3/+5
2025-04-03Add a helper function for checking if LLD was used to `run-make-support`Jakub Beránek-0/+37