about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
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-21/+24
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-21/+24
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-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-05Clean up `rustc-literal-escaper` usage in rust-analyzerGuillaume Gomez-5/+3
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-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-03Rollup merge of #138610 - oli-obk:no-sort-hir-ids, r=compiler-errorsMatthias Krüger-27/+46
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-03Add a helper function for checking if LLD was used to `run-make-support`Jakub Beránek-0/+37
2025-04-03compiletest: Encapsulate all of the code that touches libtestZalathar-98/+194
2025-04-03compiletest: Allow `--fail-fast` as a command-line optionZalathar-8/+15
2025-04-03impl !PartialOrd for HirIdOli Scherer-10/+28
2025-04-03Remove `LintExpectationId` from `Level` variantsOli Scherer-11/+11
2025-04-03Make LevelAndSource a structOli Scherer-7/+8
2025-04-03compiletest: Require `//~` annotations even if `error-pattern` is specifiedVadim Petrochenkov-10/+6
2025-04-03Tighten up assignment operator representations.Nicholas Nethercote-22/+49
In the AST, currently we use `BinOpKind` within `ExprKind::AssignOp` and `AssocOp::AssignOp`, even though this allows some nonsensical combinations. E.g. there is no `&&=` operator. Likewise for HIR and THIR. This commit introduces `AssignOpKind` which only includes the ten assignable operators, and uses it in `ExprKind::AssignOp` and `AssocOp::AssignOp`. (And does similar things for `hir::ExprKind` and `thir::ExprKind`.) This avoids the possibility of nonsensical combinations, as seen by the removal of the `bug!` case in `lang_item_for_binop`. The commit is mostly plumbing, including: - Adds an `impl From<AssignOpKind> for BinOpKind` (AST) and `impl From<AssignOp> for BinOp` (MIR/THIR). - `BinOpCategory` can now be created from both `BinOpKind` and `AssignOpKind`. - Replaces the `IsAssign` type with `Op`, which has more information and a few methods. - `suggest_swapping_lhs_and_rhs`: moves the condition to the call site, it's easier that way. - `check_expr_inner`: had to factor out some code into a separate method. I'm on the fence about whether avoiding the nonsensical combinations is worth the extra code.
2025-04-03Use `BinOpKind` instead of `BinOp` for function args where possible.Nicholas Nethercote-13/+13
Because it's nice to avoid passing in unnecessary data.
2025-04-02Auto merge of #139269 - matthiaskrgr:rollup-pk78gig, r=matthiaskrgrbors-1/+1
Rollup of 6 pull requests Successful merges: - #138992 (literal pattern lowering: use the pattern's type instead of the literal's in `const_to_pat`) - #139211 (interpret: add a version of run_for_validation for &self) - #139235 (`AstValidator` tweaks) - #139237 (Add a dep kind for use of the anon node with zero dependencies) - #139260 (Add dianqk to codegen reviewers) - #139264 (Fix two incorrect turbofish suggestions) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-02Rollup merge of #139211 - RalfJung:interpret-run-for-validation, r=oli-obkMatthias Krüger-1/+1
interpret: add a version of run_for_validation for &self Turns out we'll need this for some ongoing work in Miri. r? ``@oli-obk``
2025-04-02Rollup merge of #139239 - jieyouxu:run-make-aux-build, r=KobzolTakayuki Maeda-15/+1
Remove `aux_build` run-make rustc helpers They provide very little value and makes it more confusing than is helpful. Helps with #138066. r? `@Kobzol`
2025-04-02Rollup merge of #139232 - nnethercote:remove-Map-5, r=ZalatharTakayuki Maeda-24/+22
Move methods from `Map` to `TyCtxt`, part 5. This eliminates all methods on `Map`. Actually removing `Map` will occur in a follow-up PR. A follow-up to #137504. r? `@Zalathar`
2025-04-02Auto merge of #139018 - oli-obk:incremental-trait-impls, r=compiler-errorsbors-6/+4
Various local trait item iteration cleanups Adding a trait impl for `Foo` unconditionally affected all queries that are interested in a completely independent trait `Bar`. Perf has no effect on this. We probably don't have a good perf test for this tho. r? `@compiler-errors` I am unsure about https://github.com/rust-lang/rust/pull/139018/commits/9d05efb66f7b599eeacb5d2456f844fe4768e865 as it doesn't improve anything wrt incremental, because we still do all the checks for valid `Drop` impls, which subsequently will still invoke many queries and basically keep the depgraph the same. I want to do https://github.com/rust-lang/rust/blob/9549077a47099dc826039c051b528d1013740e6f/compiler/rustc_middle/src/ty/trait_def.rs#L141 but would leave that to a follow-up PR, this one changes enough things as it is
2025-04-02Drop `aux_build` rustc helpersJieyou Xu-15/+1
They provide very little value and makes it more confusing than is helpful.
2025-04-02Remove a function that has no necessary callersOli Scherer-2/+2
2025-04-02Auto merge of #138848 - clubby789:cargo-update, r=Mark-Simulacrumbors-218/+187
Update dependencies #136077 needs manual tweaking ``` compiler and tools dependencies Updating anyhow v1.0.95 -> v1.0.97 Updating basic-toml v0.1.9 -> v0.1.10 Updating bitflags v2.8.0 -> v2.9.0 Updating blake3 v1.5.5 -> v1.8.0 Updating bumpalo v3.16.0 -> v3.17.0 Removing byteorder v1.5.0 Updating bytes v1.9.0 -> v1.10.1 Updating cargo_metadata v0.19.1 -> v0.19.2 Updating chrono v0.4.39 -> v0.4.40 Updating chrono-tz v0.10.1 -> v0.10.3 Updating chrono-tz-build v0.4.0 -> v0.4.1 Updating clap v4.5.26 -> v4.5.35 Updating clap_builder v4.5.26 -> v4.5.35 Updating clap_derive v4.5.24 -> v4.5.35 Updating console v0.15.10 -> v0.15.11 Updating cpufeatures v0.2.16 -> v0.2.17 Updating curl-sys v0.4.78+curl-8.11.0 -> v0.4.80+curl-8.12.1 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 deranged v0.3.11 -> v0.4.1 Updating dissimilar v1.0.9 -> v1.0.10 Updating either v1.13.0 -> v1.15.0 Updating elsa v1.11.0 -> v1.11.2 Updating env_logger v0.11.6 -> v0.11.7 Updating equivalent v1.0.1 -> v1.0.2 Updating flate2 v1.0.35 -> v1.1.0 Updating foldhash v0.1.4 -> v0.1.5 Updating getrandom v0.3.1 -> v0.3.2 Updating globset v0.4.15 -> v0.4.16 Downgrading html5ever v0.29.2 -> v0.29.1 (available: v0.30.0) Updating humantime v2.1.0 -> v2.2.0 Updating icu_list_data v1.5.0 -> v1.5.1 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.7.0 -> v2.8.0 Updating indicatif v0.17.9 -> v0.17.11 Updating inout v0.1.3 -> v0.1.4 Updating itoa v1.0.14 -> v1.0.15 Adding jiff v0.2.5 Adding jiff-static v0.2.5 Updating jobserver v0.1.32 -> v0.1.33 Updating lexopt v0.3.0 -> v0.3.1 Adding leb128fmt v0.1.0 Updating libc v0.2.169 -> v0.2.171 Updating libz-sys v1.1.21 -> v1.1.22 Updating linux-raw-sys v0.4.15 -> v0.9.3 Updating litemap v0.7.4 -> v0.7.5 Updating log v0.4.25 -> v0.4.27 Downgrading markup5ever v0.15.0 -> v0.14.1 Updating miniz_oxide v0.8.3 -> v0.8.5 Updating once_cell v1.20.2 -> v1.21.3 Updating openssl-probe v0.1.5 -> v0.1.6 Updating openssl-sys v0.9.104 -> v0.9.106 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 pkg-config v0.3.31 -> v0.3.32 Updating portable-atomic v1.10.0 -> v1.11.0 Adding portable-atomic-util v0.2.4 Updating ppv-lite86 v0.2.20 -> v0.2.21 Updating proc-macro2 v1.0.93 -> v1.0.94 Updating quote v1.0.38 -> v1.0.40 Adding r-efi v5.2.0 Updating rand_core v0.9.0 -> v0.9.3 Updating redox_syscall v0.5.8 -> v0.5.10 Updating rustc-stable-hash v0.1.1 -> v0.1.2 Updating rustc_tools_util v0.4.0 -> v0.4.2 Updating rustix v0.38.43 -> v1.0.5 Updating rustversion v1.0.19 -> v1.0.20 Updating ryu v1.0.18 -> v1.0.20 Updating semver v1.0.24 -> v1.0.26 Updating serde v1.0.217 -> v1.0.219 Updating serde_derive v1.0.217 -> v1.0.219 Updating serde_json v1.0.135 -> v1.0.140 Updating similar v2.6.0 -> v2.7.0 Updating smallvec v1.13.2 -> v1.14.0 Updating socket2 v0.5.8 -> v0.5.9 Updating stacker v0.1.18 -> v0.1.20 Updating string_cache v0.8.8 -> v0.8.9 Updating syn v2.0.96 -> v2.0.100 Updating tar v0.4.43 -> v0.4.44 Updating tempfile v3.15.0 -> v3.19.1 Updating thin-vec v0.2.13 -> v0.2.14 Updating thiserror v2.0.11 -> v2.0.12 Updating thiserror-impl v2.0.11 -> v2.0.12 Updating time v0.3.37 -> v0.3.41 Updating time-core v0.1.2 -> v0.1.4 Updating time-macros v0.2.19 -> v0.2.22 Updating tinyvec v1.8.1 -> v1.9.0 Updating tokio v1.43.0 -> v1.44.1 Updating typenum v1.17.0 -> v1.18.0 Updating unicode-ident v1.0.14 -> v1.0.18 Updating uuid v1.12.0 -> v1.16.0 Updating wasi v0.13.3+wasi-0.2.2 -> v0.14.2+wasi-0.2.4 Removing wasm-encoder v0.219.1 Removing wasm-encoder v0.223.0 Adding wasm-encoder v0.219.2 (available: v0.227.1) Adding wasm-encoder v0.223.1 Adding wasm-encoder v0.228.0 Updating wasm-metadata v0.223.0 -> v0.223.1 Removing wasmparser v0.219.1 Removing wasmparser v0.222.0 Removing wasmparser v0.223.0 Adding wasmparser v0.219.2 (available: v0.227.1) Adding wasmparser v0.222.1 Adding wasmparser v0.223.1 Adding wasmparser v0.228.0 Updating wast v223.0.0 -> v228.0.0 Updating wat v1.223.0 -> v1.228.0 Updating windows-core v0.52.0 -> v0.61.0 Adding windows-implement v0.60.0 Updating windows-interface v0.59.0 -> v0.59.1 Adding windows-link v0.1.1 Updating windows-result v0.3.0 -> v0.3.2 Updating windows-strings v0.3.0 -> v0.3.1 Adding windows-strings v0.4.0 Updating wit-bindgen-rt v0.33.0 -> v0.39.0 Updating wit-component v0.223.0 -> v0.223.1 Updating wit-parser v0.223.0 -> v0.223.1 Updating xattr v1.4.0 -> v1.5.0 Updating zerocopy v0.8.14 -> v0.8.24 Updating zerocopy-derive v0.8.14 -> v0.8.24 Updating zerofrom v0.1.5 -> v0.1.6 Updating zerofrom-derive v0.1.5 -> v0.1.6 ```
2025-04-02Rollup merge of #139212 - ehuss:update-mdbook, r=Mark-SimulacrumStuart Cook-3/+3
Update mdbook to 0.4.48 This brings in several updates. Two significant ones are to halve the search index size, and the other introduces major changes to footnote rendering. Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0448
2025-04-02Rollup merge of #138913 - lolbinarycat:rustdoc-js-less-expect-error-part4, ↵Stuart Cook-1/+1
r=notriddle Remove even more instances of @ts-expect-error from search.js r? `@notriddle`
2025-04-02Move methods from `Map` to `TyCtxt`, part 5.Nicholas Nethercote-24/+22
This eliminates all methods on `Map`. Actually removing `Map` will occur in a follow-up PR.
2025-04-01Update allowed dependenciesclubby789-2/+3
2025-04-01compiler and tools dependenciesclubby789-216/+184
Updating anyhow v1.0.95 -> v1.0.97 Updating basic-toml v0.1.9 -> v0.1.10 Updating bitflags v2.8.0 -> v2.9.0 Updating blake3 v1.5.5 -> v1.8.0 Updating bumpalo v3.16.0 -> v3.17.0 Removing byteorder v1.5.0 Updating bytes v1.9.0 -> v1.10.1 Updating cargo_metadata v0.19.1 -> v0.19.2 Updating chrono v0.4.39 -> v0.4.40 Updating chrono-tz v0.10.1 -> v0.10.3 Updating chrono-tz-build v0.4.0 -> v0.4.1 Updating clap v4.5.26 -> v4.5.35 Updating clap_builder v4.5.26 -> v4.5.35 Updating clap_derive v4.5.24 -> v4.5.32 Updating console v0.15.10 -> v0.15.11 Updating cpufeatures v0.2.16 -> v0.2.17 Updating curl-sys v0.4.78+curl-8.11.0 -> v0.4.80+curl-8.12.1 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 deranged v0.3.11 -> v0.4.0 Updating dissimilar v1.0.9 -> v1.0.10 Updating either v1.13.0 -> v1.15.0 Updating elsa v1.11.0 -> v1.11.2 Updating env_logger v0.11.6 -> v0.11.7 Updating equivalent v1.0.1 -> v1.0.2 Updating flate2 v1.0.35 -> v1.1.0 Updating foldhash v0.1.4 -> v0.1.5 Updating getrandom v0.3.1 -> v0.3.2 Updating globset v0.4.15 -> v0.4.16 Downgrading html5ever v0.29.2 -> v0.29.1 (available: v0.30.0) Updating humantime v2.1.0 -> v2.2.0 Updating iana-time-zone v0.1.61 -> v0.1.63 Updating icu_list_data v1.5.0 -> v1.5.1 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.7.0 -> v2.8.0 Updating indicatif v0.17.9 -> v0.17.11 Updating inout v0.1.3 -> v0.1.4 Updating itoa v1.0.14 -> v1.0.15 Adding jiff v0.2.5 Adding jiff-static v0.2.5 Updating jobserver v0.1.32 -> v0.1.33 Adding leb128fmt v0.1.0 Updating lexopt v0.3.0 -> v0.3.1 Updating libc v0.2.169 -> v0.2.171 Updating libz-sys v1.1.21 -> v1.1.22 Updating linux-raw-sys v0.4.15 -> v0.9.3 Updating litemap v0.7.4 -> v0.7.5 Updating log v0.4.25 -> v0.4.27 Downgrading markup5ever v0.15.0 -> v0.14.1 Updating miniz_oxide v0.8.3 -> v0.8.5 Updating once_cell v1.20.2 -> v1.21.3 Updating openssl-probe v0.1.5 -> v0.1.6 Updating openssl-sys v0.9.104 -> v0.9.106 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 pkg-config v0.3.31 -> v0.3.32 Updating portable-atomic v1.10.0 -> v1.11.0 Adding portable-atomic-util v0.2.4 Updating ppv-lite86 v0.2.20 -> v0.2.21 Updating proc-macro2 v1.0.93 -> v1.0.94 Updating quote v1.0.38 -> v1.0.40 Adding r-efi v5.2.0 Updating rand_core v0.9.0 -> v0.9.3 Updating redox_syscall v0.5.8 -> v0.5.10 Updating rustc-stable-hash v0.1.1 -> v0.1.2 Updating rustc_tools_util v0.4.0 -> v0.4.2 Updating rustix v0.38.43 -> v1.0.5 Updating rustversion v1.0.19 -> v1.0.20 Updating ryu v1.0.18 -> v1.0.20 Updating semver v1.0.24 -> v1.0.26 Updating serde v1.0.217 -> v1.0.219 Updating serde_derive v1.0.217 -> v1.0.219 Updating serde_json v1.0.135 -> v1.0.140 Updating similar v2.6.0 -> v2.7.0 Updating smallvec v1.13.2 -> v1.14.0 Updating socket2 v0.5.8 -> v0.5.9 Updating stacker v0.1.18 -> v0.1.20 Updating string_cache v0.8.8 -> v0.8.9 Updating syn v2.0.96 -> v2.0.100 Updating tar v0.4.43 -> v0.4.44 Updating tempfile v3.15.0 -> v3.19.1 Updating thin-vec v0.2.13 -> v0.2.14 Updating thiserror v2.0.11 -> v2.0.12 Updating thiserror-impl v2.0.11 -> v2.0.12 Updating time v0.3.37 -> v0.3.41 Updating time-core v0.1.2 -> v0.1.4 Updating time-macros v0.2.19 -> v0.2.22 Updating tinyvec v1.8.1 -> v1.9.0 Updating tokio v1.43.0 -> v1.44.1 Updating typenum v1.17.0 -> v1.18.0 Updating unicode-ident v1.0.14 -> v1.0.18 Updating uuid v1.12.0 -> v1.16.0 Updating wasi v0.13.3+wasi-0.2.2 -> v0.14.2+wasi-0.2.4 Removing wasm-encoder v0.219.1 Removing wasm-encoder v0.223.0 Adding wasm-encoder v0.219.2 (available: v0.228.0) Adding wasm-encoder v0.223.1 Adding wasm-encoder v0.228.0 Updating wasm-metadata v0.223.0 -> v0.223.1 Removing wasmparser v0.219.1 Removing wasmparser v0.222.0 Removing wasmparser v0.223.0 Adding wasmparser v0.219.2 (available: v0.228.0) Adding wasmparser v0.222.1 Adding wasmparser v0.223.1 Adding wasmparser v0.228.0 Updating wast v223.0.0 -> v228.0.0 Updating wat v1.223.0 -> v1.228.0 Updating windows-core v0.52.0 -> v0.61.0 Adding windows-implement v0.60.0 Updating windows-interface v0.59.0 -> v0.59.1 Adding windows-link v0.1.1 Updating windows-result v0.3.0 -> v0.3.2 Removing windows-strings v0.3.0 Adding windows-strings v0.3.1 Adding windows-strings v0.4.0 Updating wit-bindgen-rt v0.33.0 -> v0.39.0 Updating wit-component v0.223.0 -> v0.223.1 Updating wit-parser v0.223.0 -> v0.223.1 Updating xattr v1.4.0 -> v1.5.0 Removing zerocopy v0.7.35 Removing zerocopy v0.8.14 Adding zerocopy v0.8.24 Removing zerocopy-derive v0.7.35 Removing zerocopy-derive v0.8.14 Adding zerocopy-derive v0.8.24 Updating zerofrom v0.1.5 -> v0.1.6 Updating zerofrom-derive v0.1.5 -> v0.1.6 library dependencies Updating dlmalloc v0.2.7 -> v0.2.8 Updating miniz_oxide v0.8.3 -> v0.8.5 Updating proc-macro2 v1.0.93 -> v1.0.94 Updating quote v1.0.38 -> v1.0.40 Updating rand_core v0.9.0 -> v0.9.3 Updating syn v2.0.98 -> v2.0.100 Updating unicode-ident v1.0.16 -> v1.0.18 Updating zerocopy v0.8.17 -> v0.8.24 Updating zerocopy-derive v0.8.17 -> v0.8.24 rustbook dependencies Updating anyhow v1.0.95 -> v1.0.97 Updating bitflags v2.8.0 -> v2.9.0 Removing byteorder v1.5.0 Updating cc v1.2.10 -> v1.2.17 Updating chrono v0.4.39 -> v0.4.40 Updating clap v4.5.27 -> v4.5.32 Updating clap_builder v4.5.27 -> v4.5.32 Updating clap_complete v4.5.43 -> v4.5.47 Updating clap_derive v4.5.24 -> v4.5.32 Updating env_logger v0.11.6 -> v0.11.7 Updating equivalent v1.0.1 -> v1.0.2 Updating flate2 v1.0.35 -> v1.1.0 Updating getrandom v0.2.15 -> v0.3.2 Updating handlebars v6.3.0 -> v6.3.2 Removing humantime v2.1.0 Updating indexmap v2.7.1 -> v2.8.0 Updating itoa v1.0.14 -> v1.0.15 Adding jiff v0.2.5 Adding jiff-static v0.2.5 Updating libc v0.2.169 -> v0.2.171 Updating linux-raw-sys v0.4.15 -> v0.9.3 Updating litemap v0.7.4 -> v0.7.5 Updating log v0.4.25 -> v0.4.26 Updating mdbook-i18n-helpers v0.3.5 -> v0.3.6 Updating miniz_oxide v0.8.3 -> v0.8.5 Updating once_cell v1.20.2 -> v1.21.1 Removing phf_generator v0.10.0 Removing phf_shared v0.10.0 Updating pkg-config v0.3.31 -> v0.3.32 Adding portable-atomic v1.11.0 Adding portable-atomic-util v0.2.4 Removing ppv-lite86 v0.2.20 Updating proc-macro2 v1.0.93 -> v1.0.94 Removing pulldown-cmark v0.11.3 Updating pulldown-cmark-to-cmark v15.0.1 -> v20.0.1 Updating quote v1.0.38 -> v1.0.40 Adding r-efi v5.2.0 Removing rand_chacha v0.3.1 Updating redox_syscall v0.5.8 -> v0.5.10 Updating rustix v0.38.44 -> v1.0.3 Updating rustversion v1.0.19 -> v1.0.20 Updating ryu v1.0.19 -> v1.0.20 Updating semver v1.0.25 -> v1.0.26 Updating serde v1.0.217 -> v1.0.219 Updating serde_derive v1.0.217 -> v1.0.219 Updating serde_json v1.0.138 -> v1.0.140 Removing siphasher v0.3.11 Updating smallvec v1.13.2 -> v1.14.0 Updating string_cache v0.8.7 -> v0.8.8 Updating string_cache_codegen v0.5.2 -> v0.5.4 Updating syn v2.0.96 -> v2.0.100 Updating tempfile v3.15.0 -> v3.19.1 Updating terminal_size v0.4.1 -> v0.4.2 Updating textwrap v0.16.1 -> v0.16.2 Updating thiserror v2.0.11 -> v2.0.12 Updating thiserror-impl v2.0.11 -> v2.0.12 Updating toml v0.8.19 -> v0.8.20 Updating toml_edit v0.22.22 -> v0.22.24 Updating typenum v1.17.0 -> v1.18.0 Updating unicode-ident v1.0.16 -> v1.0.18 Updating wasi v0.11.0+wasi-snapshot-preview1 -> v0.14.2+wasi-0.2.4 Adding windows-link v0.1.1 Updating winnow v0.6.25 -> v0.7.4 Adding wit-bindgen-rt v0.39.0 Removing zerocopy v0.7.35 Removing zerocopy-derive v0.7.35 Updating zerofrom v0.1.5 -> v0.1.6 Updating zerofrom-derive v0.1.5 -> v0.1.6
2025-04-01Auto merge of #138492 - lcnr:rm-inline_const_pat, r=oli-obkbors-4/+2
remove `feature(inline_const_pat)` Summarizing https://rust-lang.zulipchat.com/#narrow/channel/144729-t-types/topic/remove.20feature.28inline_const_pat.29.20and.20shared.20borrowck. With https://github.com/rust-lang/types-team/issues/129 we will start to borrowck items together with their typeck parent. This is necessary to correctly support opaque types, blocking the new solver and TAIT/ATPIT stabilization with the old one. This means that we cannot really support `inline_const_pat` as they are implemented right now: - we want to typeck inline consts together with their parent body to allow inference to flow both ways and to allow the const to refer to local regions of its parent.This means we also need to borrowck the inline const together with its parent as that's necessary to properly support opaque types - we want the inline const pattern to participate in exhaustiveness checking - to participate in exhaustiveness checking we need to evaluate it, which requires borrowck, which now relies on borrowck of the typeck root, which ends up checking exhaustiveness again. **This is a query cycle**. There are 4 possible ways to handle this: - stop typechecking inline const patterns together with their parent - causes inline const patterns to be different than inline const exprs - prevents bidirectional inference, we need to either fail to compile `if let const { 1 } = 1u32` or `if let const { 1u32 } = 1` - region inference for inline consts will be harder, it feels non-trivial to support inline consts referencing local regions from the parent fn - inline consts no longer participate in exhaustiveness checking. Treat them like `pat if pat == const { .. }` instead. We then only evaluate them after borrowck - difference between `const { 1 }` and `const FOO: usize = 1; match x { FOO => () }`. This is confusing - do they carry their weight if they are now just equivalent to using an if-guard - delay exhaustiveness checking until after borrowck - should be possible in theory, but is a quite involved change and may have some unexpected challenges - remove this feature for now I believe we should either delay exhaustiveness checking or remove the feature entirely. As moving exhaustiveness checking to after borrow checking is quite complex I think the right course of action is to fully remove the feature for now and to add it again once/if we've got that implementation figured out. `const { .. }`-expressions remain stable. These seem to have been the main motivation for https://github.com/rust-lang/rfcs/issues/2920. r? types cc `@rust-lang/types` `@rust-lang/lang` #76001
2025-04-01Update mdbook to 0.4.48Eric Huss-3/+3
This brings in several updates. Two significant ones are to halve the search index size, and the other introduces major changes to footnote rendering. Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0448
2025-04-01interpret: add a version of run_for_validation for &selfRalf Jung-1/+1
2025-04-01Auto merge of #137535 - Kobzol:split-metadata, r=petrochenkovbors-2/+2
Introduce `-Zembed-metadata` to allow omitting full metadata from rlibs and dylibs This is a continuation of https://github.com/rust-lang/rust/pull/120855 (I was mentored by `@bjorn3` to move it forward). Most of the original code was written by bjorn3, I tried to clean it up a bit and add some documentation and tests. This PR introduces a new unstable compiler flag called `-Zembed-metadata=[no|yes]`, with the default being `yes` (see https://github.com/rust-lang/rust/issues/57076 for context). When set to `no`, rustc will only store a small metadata stub inside rlibs/dylibs instead of the full metadata, to keep their size smaller. It should be used in combination with `--emit=metadata`, so that the users of such a compiled library can still read the metadata from the corresponding `.rmeta` file. [This comment](https://github.com/rust-lang/rust/pull/120855#issuecomment-1937018169) shows an example of binary/artifact size wins that can be achieved using this approach. Contrary to https://github.com/rust-lang/rust/pull/120855, this PR only introduces the new flag, along with a couple of run-make tests and documentation, but does not yet use it in bootstrap to actually compile rustc. I plan to do that as a follow-up step (along with integration in Cargo, which should ideally just always pass this flag to reduce the size of target directories). Fixes https://github.com/rust-lang/rust/issues/23366 Closes https://github.com/rust-lang/rust/issues/29511 Fixes https://github.com/rust-lang/rust/issues/57076 Another attempt of https://github.com/rust-lang/rust/pull/93945 and https://github.com/rust-lang/rust/pull/120855. r? `@petrochenkov`
2025-04-01Decouple trait impls of different traits wrt incrementalOli Scherer-4/+2
2025-04-01Auto merge of #138740 - nnethercote:ast-ItemKind-idents, r=fmeasebors-175/+226
Move `ast::Item::ident` into `ast::ItemKind` The follow-up to #138384, which did the same thing for `hir::ItemKind`. r? `@fmease`
2025-04-01Support metadata version 10 in proc-macro-srvJakub Beránek-2/+2
2025-04-01Address review comments.Nicholas Nethercote-12/+19
2025-04-01Move `ast::Item::ident` into `ast::ItemKind`.Nicholas Nethercote-117/+172
`ast::Item` has an `ident` field. - It's always non-empty for these item kinds: `ExternCrate`, `Static`, `Const`, `Fn`, `Mod`, `TyAlias`, `Enum`, `Struct`, `Union`, `Trait`, `TraitAlias`, `MacroDef`, `Delegation`. - It's always empty for these item kinds: `Use`, `ForeignMod`, `GlobalAsm`, `Impl`, `MacCall`, `DelegationMac`. There is a similar story for `AssocItemKind` and `ForeignItemKind`. Some sites that handle items check for an empty ident, some don't. This is a very C-like way of doing things, but this is Rust, we have sum types, we can do this properly and never forget to check for the exceptional case and never YOLO possibly empty identifiers (or possibly dummy spans) around and hope that things will work out. The commit is large but it's mostly obvious plumbing work. Some notable things. - `ast::Item` got 8 bytes bigger. This could be avoided by boxing the fields within some of the `ast::ItemKind` variants (specifically: `Struct`, `Union`, `Enum`). I might do that in a follow-up; this commit is big enough already. - For the visitors: `FnKind` no longer needs an `ident` field because the `Fn` within how has one. - In the parser, the `ItemInfo` typedef is no longer needed. It was used in various places to return an `Ident` alongside an `ItemKind`, but now the `Ident` (if present) is within the `ItemKind`. - In a few places I renamed identifier variables called `name` (or `foo_name`) as `ident` (or `foo_ident`), to better match the type, and because `name` is normally used for `Symbol`s. It's confusing to see something like `foo_name.name`.