summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2025-03-01[beta-1.86] Update cargoWeihang Lo-0/+0
2025-02-27generate-copyright: pass the vendored sources from bootstrapPietro Albini-44/+8
(cherry picked from commit 33e7f9bc6681e32cc3b3b26ea85e21da225b89ee)
2025-02-27generate-copyright: pass the list of manifests from bootstrapPietro Albini-10/+31
(cherry picked from commit 08b4f6d2c650d3e6e9010e8a27631962bf31dec7)
2025-02-27generate-copyright: pass the source root from bootstrapPietro Albini-3/+4
(cherry picked from commit 36c314cfb7999a66a49932822a336aea47f62292)
2025-02-23[beta-1.86] Update cargoWeihang Lo-0/+0
2025-02-15Auto merge of #137057 - weihanglo:update-cargo, r=weihanglobors-0/+1
Update cargo 13 commits in 2928e32734b04925ee51e1ae88bea9a83d2fd451..ce948f4616e3d4277e30c75c8bb01e094910df39 2025-02-07 16:50:22 +0000 to 2025-02-14 20:32:07 +0000 - util: provide a better error message for invalid SSH URLs (rust-lang/cargo#15185) - Fix the description of the `"root"` field of the `cargo metadata`'s output (rust-lang/cargo#15182) - refactor: Consolidate creation of SourceId from manifest path (rust-lang/cargo#15172) - docs(embedded): Note the shebang deviation (rust-lang/cargo#15173) - refactor(embedded): Integrate cargo-script logic into main parser (rust-lang/cargo#15168) - feat: implement workspace feature unification (rust-lang/cargo#15157) - Fix race condition in panic_abort_tests (rust-lang/cargo#15169) - Update all dependencies (rust-lang/cargo#15166) - Update curl from 8.9.0 to 8.12.0 (rust-lang/cargo#15162) - Update annotate-snippets from 0.11.4 to 0.11.5 (rust-lang/cargo#15165) - Update deny.toml (rust-lang/cargo#15164) - Update rusqlite from 0.32.1 to 0.33.0 (rust-lang/cargo#15163) - fix: align first line of unordered list with following (rust-lang/cargo#15161)
2025-02-15Auto merge of #137065 - jhpratt:rollup-ree9mej, r=jhprattbors-3/+2
Rollup of 9 pull requests Successful merges: - #135687 (re-export `FromCoroutine` from `core::iter`) - #135813 (CI: split i686-mingw job to three free runners) - #136749 (Implement Extend<AsciiChar> for String) - #136879 (Add safe new() to NotAllOnes) - #136978 (Windows: Update generated bindings) - #137028 (mir_build: Clarify some code for lowering `hir::PatExpr` to THIR) - #137029 (Remove unnecessary check code in unused_delims) - #137056 (made check_argument_compat public for use in miri) - #137062 (Forward all default methods for I/O impls) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-15Rollup merge of #136978 - ChrisDenton:windows-bindgen, r=AmanieuJacob Pratt-3/+2
Windows: Update generated bindings Update to windows-bindgen 0.59. This update is aimed at reducing churn in the future, but means a bit more churn now: - `bindings.txt` no longer needs us to write the namespace for each item. This is good because it means in the future we won't need to change them if the namespace changes. However, there are a few where we still need to disambiguate due to duplicate items (this is a bug in the upstream metadata). - The output in `windows-sys.rs` is now sorted. It was mostly sorted before but not intentionally. This should mean future changes are less noisy. The actual code changes are minimal here. A few types are now `bool` instead of `BOOLEAN`, which is more convenient.
2025-02-15Auto merge of #136324 - GrigorenkoPV:erf, r=tgross35bors-0/+15
Implement `f{16,32,64,128}::{erf,erfc}` (`#![feature(float_erf)]`) Tracking issue: #136321 try-job: x86_64-gnu-aux
2025-02-14Update cargoWeihang Lo-0/+1
Also add Zlib to Cargo's license exception
2025-02-14Rollup merge of #137037 - RalfJung:x86-sse2-abi, r=workingjubileeJubilee-0/+5
add x86-sse2 (32bit) ABI that requires SSE2 target feature This is the first commit of https://github.com/rust-lang/rust/pull/135408: The primary goal of this is to make SSE2 required for our i686 targets (at least for the ones that use Pentium 4 as their baseline), to ensure they cannot be affected by https://github.com/rust-lang/rust/issues/114479. This has been MCPd in https://github.com/rust-lang/compiler-team/issues/808, and is tracked in https://github.com/rust-lang/rust/issues/133611. We do this by defining a new ABI that these targets select, and making SSE2 required by the ABI (that's the first commit). That's kind of a hack, but it is the easiest way to make a target feature required via the target spec. In a follow-up change (https://github.com/rust-lang/rust/pull/135408), we can actually make use of SSE2 for the ABI, but that is running into some infrastructure issues. r? `@workingjubilee` try-job: aarch64-apple try-job: aarch64-gnu try-job: aarch64-gnu-debug try-job: test-various try-job: x86_64-gnu-nopt try-job: dist-i586-gnu-i586-i686-musl
2025-02-14Rollup merge of #136983 - ehuss:misc-2024-prep, r=tgross35Jubilee-0/+6
Prepare standard library for Rust 2024 migration This includes a variety of commits preparing the standard library for migration to Rust 2024. The actual migration is blocked on a few things, so I wanted to get this out of the way in a relatively digestable PR.
2025-02-14add x86-sse2 (32bit) ABI that requires SSE2 target featureRalf Jung-0/+5
2025-02-14miri: shims for `erf` & friendsPavel Grigorenko-0/+15
2025-02-14Rollup merge of #136958 - compiler-errors:additive-replacmeent, r=estebankMatthias Krüger-29/+18
Fix presentation of purely "additive" replacement suggestion parts #127541 changes replacement suggestions to use the "diff" view always, which I think is really verbose in cases where a replacement snippet is a "superset" of the snippet that is being replaced. Consider: ``` LL - Self::Baz: Clone, LL + Self::Baz: Clone, T: std::clone::Clone ``` In this code, we suggest replacing `", "` with `", T: std::clone::Clone"`. This is a consequence of how the snippet is constructed. I believe that since the string that is being replaced is a subset of the replacement string, it's not providing much value to present this as a diff. Users should be able to clearly understand what's being suggested here using the `~` underline view we've been suggesting for some time now. Given that this affects ~100 tests out of the ~1000 UI tests affected, I expect this to be a pretty meaningful improvement of the fallout of #127541. --- In the last commit, this PR also "trims" replacement parts so that they are turned into their purely additive subset, if possible. See the diff for what this means. --- r? estebank
2025-02-14Trim suggestion parts to the subset that is purely additiveMichael Goulet-29/+18
2025-02-13library: Update rand to 0.9.0Eric Huss-0/+6
2025-02-13Make `-O` mean `-C opt-level=3`clubby789-1/+1
2025-02-13Auto merge of #136593 - lukas-code:ty-value-perf, r=oli-obkbors-3/+4
valtree performance tuning Summary: This PR makes type checking of code with many type-level constants faster. After https://github.com/rust-lang/rust/pull/136180 was merged, we observed a small perf regression (https://github.com/rust-lang/rust/pull/136318#issuecomment-2635562821). This happened because that PR introduced additional copies in the fast reject code path for consts, which is very hot for certain crates: https://github.com/rust-lang/rust/blob/6c1d960d88dd3755548b3818630acb63fa98187e/compiler/rustc_type_ir/src/fast_reject.rs#L486-L487 This PR improves the performance again by properly interning the valtrees so that copying and comparing them becomes faster. This will become especially useful with `feature(adt_const_params)`, so the fast reject code doesn't have to do a deep compare of the valtrees. Note that we can't just compare the interned consts themselves in the fast reject, because sometimes `'static` lifetimes in the type are be replaced with inference variables (due to canonicalization) on one side but not the other. A less invasive alternative that I considered is simply avoiding copies introduced by https://github.com/rust-lang/rust/pull/136180 and comparing the valtrees it in-place (see commit: https://github.com/rust-lang/rust/commit/9e91e50ac5920f0b9b4a3b1e0880c85336ba5c64 / perf results: https://github.com/rust-lang/rust/pull/136593#issuecomment-2642303245), however that was still measurably slower than interning. There are some minor regressions in secondary benchmarks: These happen due to changes in memory allocations and seem acceptable to me. The crates that make heavy use of valtrees show no significant changes in memory usage.
2025-02-13Windows: Update generated bindings to 0.59Chris Denton-3/+2
2025-02-13intern valtreesLukas Markeffsky-3/+4
2025-02-12Auto merge of #135994 - 1c3t3a:rename-unsafe-ptr, r=oli-obkbors-15/+15
Rename rustc_middle::Ty::is_unsafe_ptr to is_raw_ptr The wording unsafe pointer is less common and not mentioned in a lot of places, instead this is usually called a "raw pointer". For the sake of uniformity, we rename this method. This came up during the review of https://github.com/rust-lang/rust/pull/134424. r? `@Noratrieb`
2025-02-12Rollup merge of #136890 - saethlin:swap_nonoverlapping, r=RalfJungGuillaume Gomez-0/+46
Change swap_nonoverlapping from lang to library UB The implementation of ptr::swap_nonoverlapping does not always escalate its safety contract to language UB, so it should be `check_library_ub`. Fixes https://github.com/rust-lang/miri/issues/4188
2025-02-12Change swap_nonoverlapping from lang to library UBBen Kimock-0/+46
2025-02-12Rollup merge of #136698 - jackpot51:i586-redox, r=RalfJungGuillaume Gomez-1/+1
Replace i686-unknown-redox target with i586-unknown-redox This change is related to https://github.com/rust-lang/rust/issues/136495
2025-02-11Add a TyPat in the AST to reuse the generic arg lowering logicOli Scherer-39/+66
2025-02-11Auto merge of #127541 - estebank:diff-suggestions, r=petrochenkovbors-1500/+2292
Show diff suggestion format on verbose replacement ``` error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/attempted-access-non-fatal.rs:7:15 | LL | let _ = 2.l; | ^ | help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix | LL - let _ = 2.l; LL + let _ = 2.0f64; | ``` before: ``` error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/attempted-access-non-fatal.rs:7:15 | LL | let _ = 2.l; | ^ | help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix | LL + let _ = 2.0f64; | ~~~~ ``` r? `@oli-obk`
2025-02-10Show diff suggestion format on verbose replacementEsteban Küber-1500/+2292
``` error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/attempted-access-non-fatal.rs:7:15 | LL | let _ = 2.l; | ^ | help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix | LL - let _ = 2.l; LL + let _ = 2.0f64; | ```
2025-02-10Auto merge of #136823 - matthiaskrgr:rollup-vp20mk1, r=matthiaskrgrbors-0/+0
Rollup of 6 pull requests Successful merges: - #136419 (adding autodiff tests) - #136628 (ci: upgrade to crosstool-ng 1.27.0) - #136681 (resolve `llvm-config` path properly on cross builds) - #136714 (Update `compiler-builtins` to 0.1.146) - #136731 (rustc_middle: parallel: TyCtxt: remove "unsafe impl DynSend/DynSync") - #136791 (Disable DWARF in linker options for i686-unknown-uefi) Failed merges: - #136767 (improve host/cross target checking) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-10Rollup merge of #136419 - EnzymeAD:autodiff-tests, r=onur-ozkan,jieyouxuMatthias Krüger-0/+0
adding autodiff tests I'd like to get started with upstreaming some tests, even though I'm still waiting for an answer on how to best integrate the enzyme pass. Can we therefore temporarily support the -Z llvm-plugins here without too much effort? And in that case, how would that work? I saw you can do remapping, e.g. `rust-src-base`, but I don't think that will give me the path to libEnzyme.so. Do you have another suggestion? Other than that this test simply checks that the derivative of `x*x` is `2.0 * x`, which in this case is computed as `%0 = fadd fast double %x.0.val, %x.0.val` (I'll add a few more tests and move it to an autodiff folder if we can use the -Z flag) r? ``@jieyouxu`` Locally at least `-Zllvm-plugins=${PWD}/build/x86_64-unknown-linux-gnu/enzyme/build/Enzyme/libEnzyme-19.so` seems to work if I copy the command I get from x.py test and run it manually. However, running x.py test itself fails. Tracking: - https://github.com/rust-lang/rust/issues/124509 Zulip discussion: https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Enzyme.20build.20changes
2025-02-10Auto merge of #135701 - calebzulawski:sync-from-portable-simd-2025-01-18, ↵bors-21/+0
r=workingjubilee Portable SIMD subtree update r? `@workingjubilee`
2025-02-10Convert more missed placesBastian Kersting-3/+3
2025-02-10Convert two missed placesBastian Kersting-2/+2
2025-02-10Extend the renaming to coerce_unsafe_ptrBastian Kersting-1/+1
2025-02-10Rename rustc_middle::Ty::is_unsafe_ptr to is_raw_ptrBastian Kersting-9/+9
The wording unsafe pointer is less common and not mentioned in a lot of places, instead this is usually called a "raw pointer". For the sake of uniformity, we rename this method. This came up during the review of https://github.com/rust-lang/rust/pull/134424.
2025-02-10Auto merge of #136809 - workingjubilee:rollup-jk0pew1, r=workingjubileebors-34/+28
Rollup of 12 pull requests Successful merges: - #136053 (coverage: Defer part of counter-creation until codegen) - #136201 (Removed dependency on the field-offset crate, alternate approach) - #136228 (Simplify Rc::as_ptr docs + typo fix) - #136353 (fix(libtest): Enable Instant on Emscripten targets) - #136472 ([`compiletest`-related cleanups 2/7] Feed stage number to compiletest directly) - #136487 (ci: stop mysql before removing it) - #136552 (Use an `Option` for `FindNextFileHandle` in `ReadDir` instead of `INVALID_FILE_HANDLE` sentinel value) - #136705 (Some miscellaneous edition-related library tweaks) - #136707 (Bump `cc` to v1.2.13 for the compiler workspace) - #136790 (Git blame ignore recent formatting commit) - #136792 (Don't apply editorconfig to llvm) - #136805 (ignore win_delete_self test in Miri) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-10Rollup merge of #136472 - jieyouxu:pass-stage, r=Mark-SimulacrumJubilee-30/+28
[`compiletest`-related cleanups 2/7] Feed stage number to compiletest directly Reference for overall changes: https://github.com/rust-lang/rust/pull/136437 Part **2** of **7** of the *`compiletest`-related cleanups* PR series. ### Summary - Pass stage number via new `--stage` compiletest flag directly from bootstrap, instead of deriving that info in compiletest by doing gymnastics on `--stage-id`. - Just a cleanup, should have no functional changes. r? bootstrap
2025-02-10Rollup merge of #136201 - davidv1992:eliminate-field-offset-alt, ↵Jubilee-4/+0
r=Mark-Simulacrum Removed dependency on the field-offset crate, alternate approach This is an alternate approach to reach the same goals as #136003. As it touches the core of the query system, this too probably should be evaluated for performance. r? ``@Mark-Simulacrum``
2025-02-10Auto merge of #136803 - lnicola:sync-from-ra, r=lnicolabors-3895/+5673
Subtree update of `rust-analyzer` r? `@ghost`
2025-02-10Bump rustc cratesLaurențiu Nicola-17/+18
2025-02-10Merge from rust-lang/rustLaurențiu Nicola-4253/+12242
2025-02-10Preparing for merge from rust-lang/rustLaurențiu Nicola-1/+1
2025-02-10Auto merge of #134740 - Flakebi:amdgpu-target, r=workingjubileebors-0/+1
Add amdgpu target Add amdgpu target to rustc and enable the LLVM target. Fix compiling `core` with the amdgpu: The amdgpu backend makes heavy use of different address spaces. This leads to situations, where a pointer in one addrspace needs to be casted to a pointer in a different addrspace. `bitcast` is invalid for this case, `addrspacecast` needs to be used. Fix compilation failures that created bitcasts for such cases by creating pointer casts (which creates an `addrspacecast` under the hood) instead. MCP: https://github.com/rust-lang/compiler-team/issues/823 Tracking issue: #135024 Kinda related to the original amdgpu tracking issue #51575 (though that one has been closed for a while).
2025-02-09Auto merge of #136751 - bjorn3:update_rustfmt, r=Mark-Simulacrumbors-231/+307
Update bootstrap compiler and rustfmt The rustfmt version we previously used formats things differently from what the latest nightly rustfmt does. This causes issues for subtrees that get formatted both in-tree and in their own repo. Updating the rustfmt used in-tree solves those issues. Also bumped the bootstrap compiler as the stage0 update command always updates both at the same time.
2025-02-09Auto merge of #136754 - Urgau:rollup-qlkhjqr, r=Urgaubors-233/+0
Rollup of 5 pull requests Successful merges: - #134679 (Windows: remove readonly files) - #136213 (Allow Rust to use a number of libc filesystem calls) - #136530 (Implement `x perf` directly in bootstrap) - #136601 (Detect (non-raw) borrows of null ZST pointers in CheckNull) - #136659 (Pick the max DWARF version when LTO'ing modules with different versions ) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-09doc: error url阿豪-1/+1
2025-02-08Rollup merge of #136706 - workingjubilee:finish-up-rustc-abi-updates, ↵Jubilee-41/+43
r=compiler-errors compiler: mostly-finish `rustc_abi` updates This almost-finishes all the updates in the compiler to use `rustc_abi` and removes some of the reexports of `rustc_abi` items in `rustc_target` that were previously available. r? ```@compiler-errors```
2025-02-09Rollup merge of #136530 - Kobzol:x-perf, r=onur-ozkanUrgau-233/+0
Implement `x perf` directly in bootstrap Discussed [here](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Turning.20.60x.20perf.60.20into.20a.20first.20class.20command). Implementing the command directly in bootstrap let's us correctly build the compiler toolchain based on input arguments (such as include rustdoc in the toolchain [only] when needed), and it also makes the CLI interface nicer. r? ``@onur-ozkan``
2025-02-08Rustfmtbjorn3-230/+306
2025-02-08Update bootstrap compiler and rustfmtbjorn3-1/+1
The rustfmt version we previously used formats things differently from what the latest nightly rustfmt does. This causes issues for subtrees that get formatted both in-tree and in their own repo. Updating the rustfmt used in-tree solves those issues. Also bumped the bootstrap compiler as the stage0 update command always updates both at the same time.