about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-06-02Merge pull request #2437 from rust-lang/rustc-pullTshepang Mbambo-9279/+15632
Rustc pull update
2025-06-02Merge pull request #19897 from aibaars/patch-2Lukas Wirth-21/+69
Produce ClosureBinder node in atom.rs
2025-06-02Trivial: fix typo (change `foo` to `bar`)Stan Manilov-1/+1
There is no `foo` symbol in the preceding example. I assume the method `bar` is meant.
2025-06-02Auto merge of #119899 - onur-ozkan:redesign-stage0-std, ↵bors-494/+486
r=albertlarsan68,jieyouxu,mark-simulacrum,kobzol,jyn514,Noratrieb,WaffleLapkin,RalfJung,bjorn3 redesign stage 0 std ### Summary **Blog post: https://blog.rust-lang.org/inside-rust/2025/05/29/redesigning-the-initial-bootstrap-sequence/** This PR changes how bootstrap builds the stage 1 compiler by switching to precompiled stage 0 standard library instead of building the in-tree one. The goal was to update bootstrap to use the beta standard library at stage 0 rather than compiling it from source (see the motivation at https://github.com/rust-lang/compiler-team/issues/619). Previously, to build a stage 1 compiler bootstrap followed this path: ``` download stage0 compiler -> build in-tree std -> compile stage1 compiler with in-tree std ``` With this PR, the new path is: ``` download stage0 compiler -> compile stage1 compiler with precompiled stage0 std ``` This also means that `cfg(bootstrap)`/`cfg(not(bootstrap))` is no longer needed for library development. ### Building "library" Since stage0 `std` is no longer in-tree `x build/test/check library --stage 0` is now no-op. The minimum supported stage to build `std` is now 1. For the same reason, default stage values in the library profile is no longer 0. Because building the in-tree library now requires a stage1 compiler, I highly recommend library developers to enable `download-rustc` to speed up compilation time. <hr> **Blog post: https://blog.rust-lang.org/inside-rust/2025/05/29/redesigning-the-initial-bootstrap-sequence/** If you encounter a bug or unexpected results please open a topic in the [#t-infra/bootstrap](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap) Zulip channel or create a [bootstrap issue](https://github.com/rust-lang/rust/issues/new?template=bootstrap.md). (Review thread: https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Review.20thread.3A.20stage.200.20redesign.20PR/with/508271433) ~~Blocked on https://github.com/rust-lang/rust/pull/122709~~ try-job: dist-x86_64-linux try-job: `x86_64-msvc*` try-job: `x86_64-apple-*` try-job: `aarch64-apple` try-job: x86_64-gnu try-job: `x86_64-gnu-llvm*`
2025-06-02Merge from rustcThe rustc-dev-guide Cronjob Bot-9278/+15631
2025-06-02Preparing for merge from rustcThe rustc-dev-guide Cronjob Bot-1/+1
2025-06-02Invert the sense of `is_not_macro_export`.Nicholas Nethercote-5/+5
I find it much easier to think about in the positive sense.
2025-06-01Improve documentation for codegen optionsNoratrieb-3/+49
This adds more information to many different codegen options. It should not add any new guarantees, just document existing behavior.
2025-06-01Auto merge of #141869 - GuillaumeGomez:rollup-vicg807, r=GuillaumeGomezbors-10/+28
Rollup of 9 pull requests Successful merges: - rust-lang/rust#140370 (Improve diagnostics for usage of qualified paths within tuple struct exprs/pats) - rust-lang/rust#141224 (terminology: allocated object → allocation) - rust-lang/rust#141622 (implement `va_arg` for `powerpc`) - rust-lang/rust#141666 (source_span_for_markdown_range: fix utf8 violation) - rust-lang/rust#141789 (Exclude `CARGO_HOME` from `generate-copyright` in-tree determination) - rust-lang/rust#141823 (Drive-by refactor: use `OnceCell` for the reverse region SCC graph) - rust-lang/rust#141834 (Add unimplemented `current_dll_path()` for WASI) - rust-lang/rust#141846 (Fix TLS model on bootstrap for cygwin) - rust-lang/rust#141852 (resolve if-let-chain FIXME on bootstrap) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-01Rollup merge of #141852 - onur-ozkan:resolve-if-let-fixme, r=jieyouxuGuillaume Gomez-3/+3
resolve if-let-chain FIXME on bootstrap self-explanatory
2025-06-01Rollup merge of #141846 - Berrysoft:cygwin-bootstrap-tls, r=mati865Guillaume Gomez-1/+6
Fix TLS model on bootstrap for cygwin There aren't other targets that both use emutls and enable `has_thread_local`, so cygwin triggers this bug first. r? mati865 See: https://github.com/rust-lang/rust/pull/141719#issuecomment-2925445263 ``@jeremyd2019`` Could you check if this PR fixes the issue? I just found my pre-built stage-0 rustc was too old to build the current rustc :(
2025-06-01Rollup merge of #141789 - ↵Guillaume Gomez-6/+19
ferrocene:hoverbear/exclude-cargo-home-from-in-tree-consideration, r=clubby789 Exclude `CARGO_HOME` from `generate-copyright` in-tree determination On Ferrocene, we noticed that in our releases the out-of-tree notices were not being included. When `x.py run generate-copyright` was ran on local development machines, it worked fine. After some investigations ``@tshepang`` and I determined that the problem was that the cargo registry (located in `CARGO_HOME`) started with the source directory on CI jobs, and was being excluded by this line: https://github.com/rust-lang/rust/blob/15825b7161f8bd6a3482211fbf6727a52aa1166b/src/tools/generate-copyright/src/cargo_metadata.rs#L85-L88 In Ferrocene's `run.sh` we set `CARGO_HOME` to be `build/cargo-home`: https://github.com/ferrocene/ferrocene/blob/96a45dd9a18c6e54d3cd81750a78fe459fa48af0/ferrocene/ci/run.sh#L34-L46 which caused this issue. This PR passes the `CARGO_HOME` variable to the `generate-copyright` tool and expands the consideration of in-tree-ness to be aware of `CARGO_HOME`. It is an upstreaming of https://github.com/ferrocene/ferrocene/pull/1491. ## Testing Run `CARGO_HOME=build/cargo-home ./x.py run generate-copyright` on `master`, then check `build/host/doc/COPYRIGHT` and look for out of tree dependencies (at the bottom). Then, try running the same command in this branch.
2025-06-01Optionally don't steal the THIRNadrieril-0/+7
2025-06-01ci: switch `x86_64-msvc-{1,2}` back to Windows Server 2025 imagesJieyou Xu-8/+2
New Windows Server 2025 images have been released (20250527).
2025-06-01tweak comment and use a weaker fenceRalf Jung-1/+4
2025-06-01Make sure to sync on file-io.rs tokio testNoratrieb-0/+1
Tokio `AsyncWriteExt::write` doesn't actually ensure that the contents have written, it just *starts* the write operation. To ensure that the file has actually been written, we need to `sync_all` first.
2025-06-01resolve if-let-chain FIXME on bootstraponur-ozkan-3/+3
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-06-01Fix tokio/file-io.rs test relying on `read`/`write` not being shortNoratrieb-3/+3
The test did `write` and `read` and hoped that it would read/write everything, which doesn't always happen and caused CI failures. Switch to `write_all` and `read_to_end` to make it more reliable.
2025-06-01Add opaque type attributesStan Manilov-0/+3
This allows for the code to compile on `nightly`.
2025-06-01Fix TLS model on bootstrap for cygwin王宇逸-1/+6
2025-06-01Merge from rustcThe Miri Cronjob Bot-111/+54
2025-06-01Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-06-01clippy and more formattingBazookaMusic-9/+4
2025-06-01rename function so it makes more senseBazookaMusic-5/+5
2025-06-01Formatting issues resolvedBazookaMusic-13/+18
2025-06-01add missing public keywordBazookaMusic-1/+1
2025-06-01Allow assist edit for converting structs to appear also on struct keyword ↵BazookaMusic-6/+192
and on visibility
2025-06-01Rollup merge of #141521 - ruancomelli:const-float-rounding, r=RalfJungJacob Pratt-61/+0
Add `const` support for float rounding methods # Add `const` support for float rounding methods This PR makes the following float rounding methods `const`: - `f64::{floor, ceil, trunc, round, round_ties_even}` - and the corresponding methods for `f16`, `f32` and `f128` Tracking issue: https://github.com/rust-lang/rust/issues/141555 ## Procedure I followed https://github.com/rust-lang/rust/commit/c09ed3e767a73d83673790f74c357432fa44d320 as closely as I could in making float methods `const`, and also received great guidance from https://internals.rust-lang.org/t/const-rounding-methods-in-float-types/22957/3?u=ruancomelli. ## Note This is my first code contribution to the Rust project, so please let me know if I missed anything - I'd be more than happy to revise and learn more. Thank you for taking the time to review it!
2025-06-01Rollup merge of #141277 - RalfJung:miri-ci, r=oli-obkJacob Pratt-4/+6
Miri CI: test aarch64-apple-darwin in PRs instead of the x86_64 target The aarch64 target is more important, and also this ensures we cover all main architectures (x86_64, i686, aarch64) in PR CI.
2025-06-01Rollup merge of #141072 - Rynibami:stabilize-const-result-flatten, r=jhprattJacob Pratt-12/+10
Stabilize feature `result_flattening` Stabilizes the `Result::flatten` method ## Implementations - [x] Implementation `Result::flatten`: https://github.com/rust-lang/rust/pull/70140 - [x] Implementation `const` `Result::flatten`: https://github.com/rust-lang/rust/pull/130692 - [x] Update stabilization attribute macros (this PR) ## Stabilization process - [x] Created this PR [suggested](https://github.com/rust-lang/rust/issues/70142#issuecomment-2885044548) by ``@RalfJung`` - [x] FCP (haven't found any, is it applicable here?) - [ ] Close issue rust-lang/rust#70142
2025-05-31update surname (was lekhonkhobe previously) and emailTshepang Mbambo-0/+1
2025-05-31Merge pull request #2432 from rust-lang/tshepang-patch-1nora-5/+2
suggest build/rust-analyzer instead of build-rust-analyzer
2025-05-31replace a broken sentenceTshepang Mbambo-1/+1
2025-05-31suggest build/rust-analyzer instead of build-rust-analyzerTshepang Mbambo-5/+2
This is better because - `./x clean` also removes it, without needing extra text to explain it - Does not need an extra .gitignore entry
2025-05-31Add const support for float rounding methodsRuan Comelli-61/+0
Add const support for the float rounding methods floor, ceil, trunc, fract, round and round_ties_even. This works by moving the calculation logic from src/tools/miri/src/intrinsics/mod.rs into compiler/rustc_const_eval/src/interpret/intrinsics.rs. All relevant method definitions were adjusted to include the `const` keyword for all supported float types: f16, f32, f64 and f128. The constness is hidden behind the feature gate feature(const_float_round_methods) which is tracked in https://github.com/rust-lang/rust/issues/141555 This commit is a squash of the following commits: - test: add tests that we expect to pass when float rounding becomes const - feat: make float rounding methods `const` - fix: replace `rustc_allow_const_fn_unstable(core_intrinsics)` attribute with `#[rustc_const_unstable(feature = "f128", issue = "116909")]` in `library/core/src/num/f128.rs` - revert: undo update to `library/stdarch` - refactor: replace multiple `float_<mode>_intrinsic` rounding methods with a single, parametrized one - fix: add `#[cfg(not(bootstrap))]` to new const method tests - test: add extra sign tests to check `+0.0` and `-0.0` - revert: undo accidental changes to `round` docs - fix: gate `const` float round method behind `const_float_round_methods` - fix: remove unnecessary `#![feature(const_float_methods)]` - fix: remove unnecessary `#![feature(const_float_methods)]` [2] - revert: undo changes to `tests/ui/consts/const-eval/float_methods.rs` - fix: adjust after rebase - test: fix float tests - test: add tests for `fract` - chore: add commented-out `const_float_round_methods` feature gates to `f16` and `f128` - fix: adjust NaN when rounding floats - chore: add FIXME comment for de-duplicating float tests - test: remove unnecessary test file `tests/ui/consts/const-eval/float_methods.rs` - test: fix tests after upstream simplification of how float tests are run
2025-05-31Rollup merge of #141819 - mati865:windows-gnullvm-host-fixes, r=jieyouxuMatthias Krüger-3/+6
Fixes for building windows-gnullvm hosts Split out from: https://github.com/rust-lang/rust/pull/140772
2025-05-31Rollup merge of #141740 - nnethercote:hir-ItemKind-field-order, r=fee1-deadMatthias Krüger-31/+31
Hir item kind field order A follow-up to rust-lang/rust#141675. r? `@fee1-dead`
2025-05-31Rollup merge of #141646 - jieyouxu:distcheck, r=Mark-SimulacrumMatthias Krüger-1/+20
Document what `distcheck` is intended to exercise Or at least attempt to. Closes rust-lang/rust#141387. cc `@marcoieni` (re. [#t-infra/bootstrap > Speed up distcheck](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Speed.20up.20distcheck/with/520208870)) r? `@Mark-Simulacrum` (as you may have some clues about if this is accurate)
2025-05-31triagebot: add doc link to `[assign]`Jieyou Xu-2/+4
2025-05-31triagebot: setup `rustc-dev-guide` adhoc-groupJieyou Xu-0/+9
So that PR authors can opt-in to request review via `r? rustc-dev-guide`.
2025-05-31triagebot: fix incorrect linkJieyou Xu-2/+2
2025-05-31bootstrap: remap compiler vs non-compiler sources differentlyJieyou Xu-10/+70
- Map compiler sources (corresponding to `rustc-dev` dist component) with `/rustc-dev/{hash}`. - Map non-compiler sources (corresponding to `rust-src` dist component or other non-compiler sources) with `/rustc/{hash}`. This allows the compiler to have the possibility of opportunistically reverse the mapping. This is because - `rust-src` unpacks sources to a path like `$sysroot/lib/rustlib/src/rust`, whereas - `rustc-dev` unpacks sources to a path like `$sysroot/lib/rustlib/rustc-src/rust` (Notice the `src` vs `rustc-src` difference.)
2025-05-31Shared libLLVM linking is officially supported with MinGW and ClangMateusz Mikuła-1/+2
2025-05-31Fix C++ standard library name for *-windows-gnullvm targetsMateusz Mikuła-1/+3
2025-05-31Fix incorrect commentMateusz Mikuła-1/+1
2025-05-31Merge pull request #19900 from Veykril/push-zurosouxqxzzLukas Wirth-2/+2
fix: Fix manual not containing diagnostics documentation
2025-05-31fix: Fix manual not containing diagnostics documentationLukas Wirth-2/+2
2025-05-31Merge commit '57cbadd68ac473bc50453f6b1320a02b68115f12'Philipp Krones-671/+1995
2025-05-31Add some new solver to PGOMichael Goulet-0/+1
2025-05-31Account for `Generate` actions when filtering the allowed onesKirill Bulatov-0/+1