about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-03-08Add inherent versions of MaybeUninit::fill methods for slicesltdk-168/+209
2025-03-08Auto merge of #138205 - onur-ozkan:fix-build-cycle, r=jieyouxubors-17/+21
handle precompiled compiler more properly Fixes the build cycle problem reported on [#t-infra/bootstrap > Cycle on `aarch64-apple`](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Cycle.20on.20.60aarch64-apple.60/with/504231609).
2025-03-08update doc-comment for `forced_compiler`onur-ozkan-2/+2
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-08handle precompiled compiler more properlyonur-ozkan-15/+19
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-08Auto merge of #138202 - jhpratt:rollup-kqrl5xn, r=jhprattbors-99/+644
Rollup of 12 pull requests Successful merges: - #137337 (Add verbatim linker to AIXLinker) - #137363 (compiler: factor Windows x86-32 ABI impl into its own file) - #137537 (Prevent `rmake.rs` from using unstable features, and fix 3 run-make tests that currently do) - #137606 (add a "future" edition) - #137957 (Remove i586-pc-windows-msvc) - #138000 (atomic: clarify that failing conditional RMW operations are not 'writes') - #138013 (Add post-merge analysis CI workflow) - #138033 (rustdoc: Add attribute-related tests for rustdoc JSON.) - #138137 (setTargetTriple now accepts Triple rather than string) - #138173 (Delay bug for negative auto trait rather than ICEing) - #138184 (Allow anyone to relabel `CI-spurious-*`) - #138187 (remove clones) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-07Rollup merge of #138187 - matthiaskrgr:rmclone, r=cjgillotJacob Pratt-19/+10
remove clones
2025-03-07Rollup merge of #138184 - thaliaarchi:unauthenticated-ci-spurious, ↵Jacob Pratt-0/+1
r=compiler-errors Allow anyone to relabel `CI-spurious-*` As suggested by `@Noratrieb` in reference to me attempting to set this label in https://github.com/rust-lang/rust/pull/136780#issuecomment-2707364425, allow unauthenticated users to relabel `CI-spurious-*`.
2025-03-07Rollup merge of #138173 - compiler-errors:incoherent-negative-impl, r=oli-obkJacob Pratt-1/+34
Delay bug for negative auto trait rather than ICEing Fixes #138149 r? oli-obk
2025-03-07Rollup merge of #138137 - ZequanWu:fix-triple, r=cuviperJacob Pratt-2/+6
setTargetTriple now accepts Triple rather than string https://github.com/llvm/llvm-project/pull/129868 updated `setTargetTriple`
2025-03-07Rollup merge of #138033 - obi1kenobi:pg/json-attrs-tests, r=aDotInTheVoidJacob Pratt-0/+58
rustdoc: Add attribute-related tests for rustdoc JSON. Add rustdoc JSON tests covering the use of the following attributes: - `#[non_exhaustive]` applied to enums, variants, and structs - `#[must_use]`, both with and without a message - `#[no_mangle]`, in both edition 2021 and 2024 (`#[unsafe(no_mangle)]`) flavors - `#[export_name]`, also in both edition 2021 and 2024 flavors Related to #137645; this is a subset of the attributes that `cargo-semver-checks` relies on and tests in its own test suite or in the test suites of its components such as `trustfall-rustdoc-adapter`. Helps with #81359 r? `@aDotInTheVoid`
2025-03-07Rollup merge of #138013 - Kobzol:ci-post-merge-analysis, r=marcoieniJacob Pratt-10/+319
Add post-merge analysis CI workflow This PR adds a post-merge analysis workflow, which was discussed [here](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Reporting.20test.20suite.20statistics.20after.20merge). The workflow currently analyzes test suite results from bootstrap metrics. It downloads metrics for all known jobs in the parent and current (HEAD) commit, compares them and prints a truncated diff. It then posts this diff to the merged PR as a comment. Later I also want to add other statistics to the analysis, e.g. changes in CI/bootstrap step durations. It can be tested locally e.g. using this: ``` cargo run --release --manifest-path src/ci/citool/Cargo.toml post-merge-report 3cb02729ab3c6583a3b1d1845c5e22b674f04b8d fd17deacce374a4185c882795be162e17b557050 ``` This uses a slightly older commit as a parent, to have more results in the diff (normally the diff won't be so large). CC `@jieyouxu` r? `@marcoieni`
2025-03-07Rollup merge of #138000 - RalfJung:atomic-rmw, r=AmanieuJacob Pratt-2/+3
atomic: clarify that failing conditional RMW operations are not 'writes' Fixes https://github.com/rust-lang/rust/issues/136669 r? ``@Amanieu`` Cc ``@rust-lang/opsem`` ``@chorman0773`` ``@gnzlbg`` ``@briansmith``
2025-03-07Rollup merge of #137957 - Noratrieb:no, r=wesleywiserJacob Pratt-22/+11
Remove i586-pc-windows-msvc See [MCP 840](https://github.com/rust-lang/compiler-team/issues/840). I left a specialized error message that should help users that hit this in the wild (for example, because they use it in their CI). ``` error: Error loading target specification: the `i586-pc-windows-msvc` target has been removed. Use the `i686-pc-windows-msvc` target instead. Windows 10 (the minimum required OS version) requires a CPU baseline of at least i686 so you can safely switch. Run `rustc --print target-list` for a list of built-in targets ``` ``@workingjubilee`` ``@calebzulawski`` fyi portable-simd uses this target in CI, if you wanna remove it already before this happens
2025-03-07Rollup merge of #137606 - davidtwco:next-edition, r=traviscross,ehussJacob Pratt-2/+67
add a "future" edition This idea has been discussed previously [on Zulip](https://rust-lang.zulipchat.com/#narrow/channel/213817-t-lang/topic/Continuous.20edition-like.20changes.3F/near/432559262) (though what I've implemented isn't exactly the "next"/"future" editions proposed in that message, just the "future" edition). I've found myself prototyping changes that involve edition migrations and wanting to target an upcoming edition for those migrations, but none exists. This should be permanently unstable and not removed.
2025-03-07Rollup merge of #137537 - jieyouxu:daily-rmake, r=KobzolJacob Pratt-15/+43
Prevent `rmake.rs` from using unstable features, and fix 3 run-make tests that currently do Addresses (mostly) #137532. Follow-up to #137373. ### Summary - Fix 3 run-make tests that currently use unstable features: 1. `tests/run-make/issue-107495-archive-permissions/rmake.rs` uses `#![feature(rustc_private)]` for `libc` on `unix`, but `run_make_support` already exports `libc`, so just use that. 2. `tests/run-make/cross-lang-lto/rmake.rs` uses `#![feature(path_file_prefix)]` for convenience, replaced with similar filename prefix logic. 3. `tests/run-make/broken-pipe-no-ice/rmake.rs` uses `#![feature(anonymous_pipe)]` for anonymous pipes. This is more complicated[^race-condition], and I decided to temporarily introduce a dependency on [`os_pipe`] before std's `anonymous_pipe` library feature is stabilized[^pipe-stab]. I left a FIXME tracked by #137532 to make the switch once `anonymous_pipe` stabilizes and reaches beta. - Use `RUSTC_BOOTSTRAP=-1` when building `rmake.rs` to have the stage 0 rustc reject any unstable features used in `rmake.rs`. - The requirement that `rmake.rs` may not use any unstable features is now documented in rustc-dev-guide. - This PR does not impose `RUSTC_BOOTSTRAP=-1` when building `run-make-support`, but I suppose we could. r? `@Kobzol` try-job: x86_64-msvc-1 try-job: x86_64-mingw-1 [`os_pipe`]: https://github.com/oconnor663/os_pipe.rs [^race-condition]: We can't just try to spawn `rustc` and immediate close the stderr handle because of race condition, as there's no guarantee `rustc` will not try to print to stderr before the handle gets closed. [^pipe-stab]: In-progress stabilization PR over at https://github.com/rust-lang/rust/pull/135822.
2025-03-07Rollup merge of #137363 - workingjubilee:untangle-x86-abi-impl, r=jieyouxuJacob Pratt-23/+89
compiler: factor Windows x86-32 ABI impl into its own file While it shares more than zero code with the SysV x86-32 ABI impl, there is no particular reason to organize wildly different ABIs using if-else in the same function.
2025-03-07Rollup merge of #137337 - dalvescb:master, r=petrochenkovJacob Pratt-3/+3
Add verbatim linker to AIXLinker This adds support for the "verbatim" native link modifier on AIX, will successfully pass the `native-link-modifier-verbatim-linker test case`
2025-03-07remove clonesMatthias Krüger-19/+10
2025-03-07Auto merge of #138177 - matthiaskrgr:rollup-y0ikkzz, r=matthiaskrgrbors-572/+2022
Rollup of 6 pull requests Successful merges: - #134797 (Ergonomic ref counting) - #137549 (Clean up various LLVM FFI things in codegen_llvm) - #137977 (Reduce `kw::Empty` usage, part 1) - #138042 (Suggest struct or union to add generic that impls trait) - #138141 (tests: fix some typos in comment) - #138150 (Streamline HIR intravisit `visit_id` calls for items) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-07Allow anyone to relabel CI-spurious-*Thalia Archibald-0/+1
2025-03-07Rollup merge of #138150 - nnethercote:streamline-intravisit-visit_id, r=oli-obkMatthias Krüger-35/+13
Streamline HIR intravisit `visit_id` calls for items A small clean up.
2025-03-07Rollup merge of #138141 - tcpdumppy:master, r=compiler-errorsMatthias Krüger-6/+6
tests: fix some typos in comment fix some typos in comment
2025-03-07Rollup merge of #138042 - xizheyin:issue-135759, r=nnethercoteMatthias Krüger-2/+142
Suggest struct or union to add generic that impls trait Fixes #135759 cc ```@tdittr```
2025-03-07Rollup merge of #137977 - nnethercote:less-kw-Empty-1, r=spastorinoMatthias Krüger-83/+125
Reduce `kw::Empty` usage, part 1 This PR fixes some confusing `kw::Empty` usage, fixing a crash test along the way. r? ```@spastorino```
2025-03-07Rollup merge of #137549 - oli-obk:llvm-ffi, r=davidtwcoMatthias Krüger-367/+335
Clean up various LLVM FFI things in codegen_llvm cc ```@ZuseZ4``` I touched some autodiff parts The major change of this PR is [bfd88ce](https://github.com/rust-lang/rust/pull/137549/commits/bfd88cead0dd79717f123ad7e9a26ecad88653cb) which makes `CodegenCx` generic just like `GenericBuilder` The other commits mostly took advantage of the new feature of making extern functions safe, but also just used some wrappers that were already there and shrunk unsafe blocks. best reviewed commit-by-commit
2025-03-07Rollup merge of #134797 - spastorino:ergonomic-ref-counting-1, r=nikomatsakisMatthias Krüger-79/+1401
Ergonomic ref counting This is an experimental first version of ergonomic ref counting. This first version implements most of the RFC but doesn't implement any of the optimizations. This was left for following iterations. RFC: https://github.com/rust-lang/rfcs/pull/3680 Tracking issue: https://github.com/rust-lang/rust/issues/132290 Project goal: https://github.com/rust-lang/rust-project-goals/issues/107 r? ```@nikomatsakis```
2025-03-07Delay bug for negative auto trait rather than ICEingMichael Goulet-1/+34
2025-03-07Auto merge of #138148 - onur-ozkan:fix-llvm-bitcode-build, r=jieyouxubors-4/+4
use target compiler on llvm-bitcode-linker The build compiler is already resolved inside the `ToolBuild` step, so we should pass only the target compilers for `Mode::ToolRustc` tools. Fixes https://github.com/rust-lang/rust/issues/138123 r? ghost try-job: dist-powerpc64le-linux
2025-03-07Auto merge of #138155 - matthiaskrgr:rollup-xq5buio, r=matthiaskrgrbors-691/+579
Rollup of 6 pull requests Successful merges: - #137674 (Enable `f16` for LoongArch) - #138034 (library: Use `size_of` from the prelude instead of imported) - #138060 (Revert #138019 after further discussion about how hir-pretty printing should work) - #138073 (Break critical edges in inline asm before code generation) - #138107 (`librustdoc`: clippy fixes) - #138111 (Use `default_field_values` for `rustc_errors::Context`, `rustc_session::config::NextSolverConfig` and `rustc_session::config::ErrorOutputType`) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-07Document that `rmake.rs`/`run-make-support` may not use unstable features许杰友 Jieyou Xu (Joe)-0/+4
2025-03-07Fix `broken-pipe-no-ice` to not depend on unstable `anonymous_pipe` feature许杰友 Jieyou Xu (Joe)-4/+4
2025-03-07Temporarily depend on `os_pipe` in `run-make-support` and re-export it许杰友 Jieyou Xu (Joe)-0/+17
For `broken-pipe-no-ice` until std `anonymous_pipe` stabilizes.
2025-03-07Fix `cross-lang-lto` to not use `path_file_prefix`许杰友 Jieyou Xu (Joe)-8/+12
2025-03-07Fix `issue-107495-archive-permissions` to not rely on `rustc_private`许杰友 Jieyou Xu (Joe)-3/+1
2025-03-07Prevent `rmake.rs` from using any nightly/unstable features许杰友 Jieyou Xu (Joe)-0/+5
2025-03-07Apply `--cfg windows_raw_dylib` for bootstrap tools tooJieyou Xu-1/+1
This is already applied for rustc/std tools. This is needed to make `windows` crates avoid trying to depend on a generated `windows.0.xx.0.lib`.
2025-03-07Auto merge of #138151 - matthiaskrgr:rollup-j0p6ed1, r=matthiaskrgrbors-69/+431
Rollup of 8 pull requests Successful merges: - #136667 (Revert vita's c_char back to i8) - #137107 (Override default `Write` methods for cursor-like types) - #137777 (Specialize `OsString::push` and `OsString as From` for UTF-8) - #137832 (Fix crash in BufReader::peek()) - #137904 (Improve the generic MIR in the default `PartialOrd::le` and friends) - #138115 (Suggest typo fix for static lifetime) - #138125 (Simplify `printf` and shell format suggestions) - #138129 (Stabilize const_char_classify, const_sockaddr_setters) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-07Make synthetic RPITIT assoc ty name handling more rigorous.Nicholas Nethercote-36/+84
Currently it relies on special treatment of `kw::Empty`, which is really easy to get wrong. This commit makes the special case clearer in the type system by using `Option`. It's a bit clumsy, but the synthetic name handling itself is a bit clumsy; better to make it explicit than sneak it in. Fixes #133426.
2025-03-07Pass `Option<Symbol>` to `def_path_data`/`create_def` methods.Nicholas Nethercote-53/+47
It's clearer than using `kw::Empty` to mean `None`.
2025-03-07Fix a typo in the crashtest output.Nicholas Nethercote-1/+1
2025-03-07Rollup merge of #138111 - estebank:use-dfv, r=nnethercoteMatthias Krüger-49/+37
Use `default_field_values` for `rustc_errors::Context`, `rustc_session::config::NextSolverConfig` and `rustc_session::config::ErrorOutputType` Wanted to see where `#![feature(default_field_values)]` could be used in the codebase. These three seemed like no-brainers. There are a bunch of more places where we could remove manual `Default` impls, but they `derive` other traits that rely on `syn`, which [doesn't yet support `default_field_values`](https://github.com/dtolnay/syn/issues/1774).
2025-03-07Rollup merge of #138107 - yotamofek:pr/rustdoc/clippy, r=GuillaumeGomezMatthias Krüger-49/+45
`librustdoc`: clippy fixes First commit is all machine-generated fixes, next two are some more lints fixed by hand/misc. cleanups Inspired by the redundant `.and_then()` added in https://github.com/rust-lang/rust/pull/137320 , and [this comment](https://github.com/rust-lang/rust/pull/138090#discussion_r1983111856) r? ```@GuillaumeGomez```
2025-03-07Rollup merge of #138073 - tmiasko:inline-asm-critical-edges, r=bjorn3Matthias Krüger-17/+81
Break critical edges in inline asm before code generation An inline asm terminator defines outputs along its target edges -- a fallthrough target and labeled targets. Code generation implements this by inserting code directly into the target blocks. This approach works only if the target blocks don't have other predecessors. Establish required invariant by extending existing code that breaks critical edges before code generation. Fixes #137867. r? ``@bjorn3``
2025-03-07Rollup merge of #138060 - jdonszelmann:revert-138019, r=compiler-errorsMatthias Krüger-79/+14
Revert #138019 after further discussion about how hir-pretty printing should work After some more discussion, #138019 was probably merged a little fast. Though there probably is a real bug in pretty printing, it is not feasible to add similar pretty printing routines for all attributes, and making this specific exception is likely not desired either. For more context, see post-merge comments on #138019 I kept the tests around, but reverted the hir-pretty change. r? ```@compiler-errors```
2025-03-07Rollup merge of #138034 - thaliaarchi:use-prelude-size-of, r=tgross35Matthias Krüger-496/+402
library: Use `size_of` from the prelude instead of imported Use `std::mem::{size_of, size_of_val, align_of, align_of_val}` from the prelude instead of importing or qualifying them. These functions were added to all preludes in Rust 1.80. try-job: test-various try-job: x86_64-gnu try-job: x86_64-msvc-1
2025-03-07Rollup merge of #137674 - heiher:enable-f16-loong, r=tgross35Matthias Krüger-1/+0
Enable `f16` for LoongArch Blocked on https://github.com/rust-lang/compiler-builtins/pull/770 r? ```@tgross35``` Tracking issue for f16: https://github.com/rust-lang/rust/issues/116909 try-job: dist-loongarch64-linux try-job: dist-loongarch64-musl
2025-03-07Rollup merge of #138129 - RalfJung:stabilize-const-things, r=tgross35Matthias Krüger-10/+10
Stabilize const_char_classify, const_sockaddr_setters FCP for const_char_classify: #132241 FCP for const_sockaddr_setters: #131714 Fixes #132241 Fixes #131714 Cc ``@rust-lang/wg-const-eval``
2025-03-07Rollup merge of #138125 - thaliaarchi:defer-alloc-printf-suggestion, ↵Matthias Krüger-9/+11
r=compiler-errors Simplify `printf` and shell format suggestions Simplify tracking `printf` and shell format suggestions. Although allocations could be deferred until after checking that they aren't already in the map, this style is simpler.
2025-03-07Rollup merge of #138115 - compiler-errors:static-typo, r=BoxyUwUMatthias Krüger-18/+63
Suggest typo fix for static lifetime ...and don't try to introduce a new lifetime param named something like `'statoc`.
2025-03-07Rollup merge of #137904 - scottmcm:ordering-is, r=workingjubileeMatthias Krüger-9/+132
Improve the generic MIR in the default `PartialOrd::le` and friends It looks like I regressed this accidentally in #137197 due to #137901 So this PR does two things: 1. Tweaks the way we're calling `is_some_and` so that it optimizes in the generic MIR (rather than needing to optimize it in every monomorphization) -- the first commit adds a MIR test, so you can see the difference in the second commit. 2. Updates the implementations of `is_le` and friends to be slightly simpler, and parallel how clang does them.