about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-09-30Pass around `DirectiveLine` instead of bare stringsZalathar-145/+107
2025-09-30Remove `parse_negative_name_directive`Zalathar-16/+2
This isn't actually used for anything, and its presence complicates the migration to `DirectiveLine`.
2025-09-30Split off a separate name/value parser for debuginfo test commandsZalathar-16/+19
2025-09-29Rollup merge of #147153 - ↵Jacob Pratt-2/+2
GuillaumeGomez:doc-propagation-before-stripping-items, r=lolbinarycat [rustdoc] Move doc cfg propagation pass before items stripping passes Follow-up of https://github.com/rust-lang/rust/pull/138907. r? lolbinarycat
2025-09-29Rollup merge of #145883 - shepmaster:unify-macos-ci, r=madsmtmJacob Pratt-5/+9
Make macOS dist build configuration match where reasonable r? `@madsmtm`
2025-09-29Don't condition RUSTDOC_LIBDIR on `--no-doc`Jynn Nelson-9/+3
In d94e7ff065cd393a645eb3e9c96ce0418856e95d, `rustdoc_path` was changed to ignore `want_rustdoc` (which is just whether `--no-doc` was passed). But RUSTDOC_LIBDIR wasn't kept in sync. Rather than trying to keep `rustdoc_path` in sync with `RUSTDOC_LIBDIR`, just pass LIBDIR to the rustc shim unconditionally. This fix allows calling `ensure(doc::Step)` from a non-doc top-level Step, even if `--no-doc` was present in the command line.
2025-09-29Rollup merge of #147133 - GuillaumeGomez:rm-loop-extract_cfg_from_attrs, ↵Matthias Krüger-11/+5
r=lolbinarycat Remove one loop in `extract_cfg_from_attrs` Follow-up of https://github.com/rust-lang/rust/pull/138907. r? lolbinarycat
2025-09-29Move doc cfg propagation pass before items stripping passesGuillaume Gomez-2/+2
2025-09-29move test per review feedbackOblarg-97/+42
2025-09-29Auto merge of #146376 - durin42:dwo-specify-path, r=davidtwcobors-0/+14
debuginfo: add an unstable flag to write split DWARF to an explicit directory Bazel requires knowledge of outputs from actions at analysis time, including file or directory name. In order to work around the lack of predictable output name for dwo files, we group the dwo files in a subdirectory of --out-dir as a post-processing step before returning control to bazel. Unfortunately some debugging workflows rely on directly opening the dwo file rather than loading the merged dwp file, and our trick of moving the files breaks those users. We can't just hardlink the file or copy it, because with remote build execution we wouldn't end up with the un-moved file copied back to the developer's workstation. As a fix, we add this unstable flag that causes dwo files to be written to a build-system-controllable location, which then lets bazel hoover up the dwo files, but the objects also have the correct path for the dwo files. r? `@davidtwco`
2025-09-29Make macOS dist build configuration match where reasonableJake Goulding-5/+9
2025-09-29Auto merge of #147151 - Zalathar:rollup-w81rn0j, r=Zalatharbors-1/+2
Rollup of 5 pull requests Successful merges: - rust-lang/rust#146653 (improve diagnostics for empty attributes) - rust-lang/rust#146987 (impl Ord for params and use unstable sort) - rust-lang/rust#147101 (Use `Iterator::eq` and (dogfood) `eq_by` in compiler and library ) - rust-lang/rust#147123 (Fix removed version numbers of `doc_auto_cfg` and `doc_cfg_hide`) - rust-lang/rust#147149 (add joboet to library review rotation) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-29Improve code commentsGuillaume Gomez-5/+3
2025-09-29Rollup merge of #147101 - yotamofek:pr/iter-eq-and-eq-by, r=jdonszelmannStuart Cook-1/+2
Use `Iterator::eq` and (dogfood) `eq_by` in compiler and library Now that rust-lang/rust#137122 has landed, we can replace stuff that looks like: ```rust let a: &[T]; let b: &[T]; let eq = a.len() == b.len() && a.iter().zip(b).all(|(a,b)| a == b) ``` with the much simpler `a.iter().eq(b)`, without losing the perf benefit of the different-length-fast-path. Also dogfooded `Iterator::eq_by` (cc rust-lang/rust#64295 ) while I'm at it. First commit (4d1b6fad230f8a5ccceccc7562eadc4ea50059da) should be very straightforward to review, second one (049a4606cb3906787aedf508ee8eea09c2bb3b9a) is slightly more creative, but IMHO a nice cleanup.
2025-09-29Auto merge of #147145 - Zalathar:rollup-s7kcs3w, r=Zalatharbors-12/+12
Rollup of 3 pull requests Successful merges: - rust-lang/rust#147100 (tests: Remove ignore-android directive for fixed issue) - rust-lang/rust#147116 (compiler: remove AbiAlign inside TargetDataLayout) - rust-lang/rust#147134 (remove explicit deref of AbiAlign for most methods) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-29Merge pull request #20760 from A4-Tacks/all-any-not-attr-compShoyu Vanilla (Flint)-6/+56
Add `all` `any` and `not` attribute completions
2025-09-29Rollup merge of #147134 - workingjubilee:remove-explicit-abialign-deref, ↵Stuart Cook-12/+12
r=Zalathar remove explicit deref of AbiAlign for most methods Much of the compiler calls functions on Align projected from AbiAlign. AbiAlign impls Deref to its inner Align, so we can simplify these away. Also, it will minimize disruption when AbiAlign is removed. For now, preserve usages that might resolve to PartialOrd or PartialEq, as those have odd inference.
2025-09-29Use `Iterator::eq` and (dogfood) `eq_by` in compiler and libraryYotam Ofek-1/+2
2025-09-29Merge ref 'f957826bff7a' from rust-lang/rustThe rustc-josh-sync Cronjob Bot-1980/+2787
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: f957826bff7a68b267ce75b1ea56352aed0cca0a Filtered ref: 7291893f9d875b6e8775a7a0e661abdaec15d3c1 Upstream diff: https://github.com/rust-lang/rust/compare/caccb4d0368bd918ef6668af8e13834d07040417...f957826bff7a68b267ce75b1ea56352aed0cca0a This merge was created using https://github.com/rust-lang/josh-sync.
2025-09-29Prepare for merging from rust-lang/rustThe rustc-josh-sync Cronjob Bot-1/+1
This updates the rust-version file to f957826bff7a68b267ce75b1ea56352aed0cca0a.
2025-09-29Rollup merge of #146929 - Zalathar:capture, r=Kobzol,jieyouxuStuart Cook-154/+78
compiletest: Remove old-output-capture and become a stage0 bootstrap tool The new compiletest output-capture system became the default in rust-lang/rust#146574, and no problems have been reported since. This PR therefore removes the old output-capture implementation from compiletest, and adjusts bootstrap to always build and test compiletest as a stage0 bootstrap tool. In other words, compiletest no longer relies on any unstable features (such as `libtest` or `internal_output_capture`), and is now written entirely in stable Rust! The compiletest self-tests still need access to an in-tree rustc, in order to obtain information via `rustc --print`, so we interpret `--stage` as indicating the stage of that secondary compiler, but always use the stage0 compiler to build compiletest itself. r? Kobzol
2025-09-28remove explicit deref of AbiAlign for most methodsJubilee Young-12/+12
Much of the compiler calls functions on Align projected from AbiAlign. AbiAlign impls Deref to its inner Align, so we can simplify these away. Also, it will minimize disruption when AbiAlign is removed. For now, preserve usages that might resolve to PartialOrd or PartialEq, as those have odd inference.
2025-09-28Auto merge of #146513 - madsmtm:apple-reenable-assertions, r=Mark-Simulacrumbors-12/+0
Re-enable assertions on macOS alt builds These were previously disabled, in part for performance reasons, in part due to needing availability symbols `__isPlatformVersionAtLeast` and `__isOSVersionAtLeast` that `compiler-builtins` did not provide, see https://github.com/rust-lang/rust/pull/62592#issuecomment-510670657 and https://github.com/rust-lang/rust/pull/134275#issuecomment-2543067830 for failed checks. Since https://github.com/rust-lang/rust/pull/138944 though, `std` now provides these symbols, so we should be able to re-enable LLVM assertions, debug assertions and overflow checks. Fixes https://github.com/rust-lang/rust/issues/59637. try-job: `*apple*`
2025-09-28Remove one loop in `extract_cfg_from_attrs`Guillaume Gomez-8/+4
2025-09-28Auto merge of #147128 - matthiaskrgr:rollup-mqey4c4, r=matthiaskrgrbors-6/+7
Rollup of 6 pull requests Successful merges: - rust-lang/rust#140482 (std::net: update tcp deferaccept delay type to Duration.) - rust-lang/rust#141469 (Allow `&raw [mut | const]` for union field in safe code) - rust-lang/rust#144197 (TypeTree support in autodiff) - rust-lang/rust#146675 (Allow shared access to `Exclusive<T>` when `T: Sync`) - rust-lang/rust#147113 (Reland "Add LSX accelerated implementation for source file analysis") - rust-lang/rust#147120 (Fix --extra-checks=spellcheck to prevent cargo install every time) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-28Rollup merge of #147120 - Shunpoco:issue-147105, r=KobzolMatthias Krüger-5/+6
Fix --extra-checks=spellcheck to prevent cargo install every time Fixes rust-lang/rust#147105 ## Background Current implementation of `ensure_version_of_cargo_install` uses `bin_name` to check if it exists, but it should use `<tool_root_dir>/<tool_bin_dir>/<bin_name>` instead. Otherwise the check fails every time, hence the function falls back to install the binary. ## Change Move lines which define bin_path at the top of the function, and use bin_path for the check
2025-09-28Rollup merge of #141469 - Kivooeo:remove-usnsafegate, r=compiler-errorsMatthias Krüger-1/+1
Allow `&raw [mut | const]` for union field in safe code fixes rust-lang/rust#141264 r? ``@Veykril`` Unresolved questions: - [x] Any edge cases? - [x] How this works with rust-analyzer (because all I've did is prevent compiler from emitting error in `&raw` context) (rust-lang/rust-analyzer#19867) - [x] Should we allow `addr_of!` and `addr_of_mut!` as well? In current version they both (`&raw` and `addr_of!`) are allowed (They are the same) - [x] Is chain of union fields is a safe? (Yes)
2025-09-28Auto merge of #147002 - notriddle:stringdex3, r=GuillaumeGomezbors-28/+52
rustdoc-search: stringdex update with more packing Before: 18M build/x86_64-unknown-linux-gnu/doc/search.index/ 57M build/x86_64-unknown-linux-gnu/compiler-doc/search.index/ After: 16M build/x86_64-unknown-linux-gnu/doc/search.index/ 49M build/x86_64-unknown-linux-gnu/compiler-doc/search.index/ CC rust-lang/rust#146063
2025-09-28Merge pull request #19867 from Kivooeo/unsafegateLukas Wirth-1/+60
Allow `&raw [mut | const]` for union field
2025-09-28Auto merge of #147118 - matthiaskrgr:rollup-4yqmoyr, r=matthiaskrgrbors-645/+722
Rollup of 14 pull requests Successful merges: - rust-lang/rust#142139 (Include additional hashes in src/stage0) - rust-lang/rust#146745 (Clarified error note for usize range matching) - rust-lang/rust#146763 (cg_llvm: Replace some DIBuilder wrappers with LLVM-C API bindings (part 5)) - rust-lang/rust#146788 (chore: removes deprecated discord.) - rust-lang/rust#146942 ([rustdoc] Finish getting rid of usages `write_str`) - rust-lang/rust#147061 (fix rebasing cycle heads when not reaching a fixpoint) - rust-lang/rust#147066 (Fix tracking issue number for feature(macro_attr)) - rust-lang/rust#147081 (doc: fix a typo in platform-support.md) - rust-lang/rust#147082 (formatting_options: fix alternate docs 0b/0o mixup) - rust-lang/rust#147086 (compiletest: Use `PanicHookInfo::payload_as_str` now that it's stable in beta) - rust-lang/rust#147093 (redox: switch to colon as path separator) - rust-lang/rust#147095 (Library: Remove remaining private `#[repr]` workarounds) - rust-lang/rust#147098 (Add auto extra-checks in pre-push hook) - rust-lang/rust#147110 (Fix typo) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-28modify ensure_version_or_cargo_install to check existing binaryShunpoco-5/+6
Current implementation uses bin_name to check if it exists, but it should use tool_root_dir/tool_bin_dir/bin_name instead. Otherwise the check fails every time, hence the function falls back to install the binary.
2025-09-28`tool_check_step!` no longer needs a builder to determine modeZalathar-26/+18
2025-09-28Build and test compiletest as a stage0 bootstrap toolZalathar-64/+40
2025-09-28Add a bootstrap snapshot test for `x test compiletest`Zalathar-0/+12
2025-09-28Remove old-output-capture from compiletestZalathar-66/+10
2025-09-28Fix change-tracker entry for 147046Zalathar-1/+1
2025-09-28Rollup merge of #147098 - Shunpoco:issue-147088, r=KobzolMatthias Krüger-1/+4
Add auto extra-checks in pre-push hook Fixes rust-lang/rust#147088 This PR adds auto py, cpp, and js extra checks into the pre-push script. - It checks those non-Rust files only if they are modified in the commit - Thanks to auto mode, the pre-push doesn't check them if none of them are modified. It means that it doesn't build venv, nor install node_packages under build/ Note that this PR doesn't add shellcheck and spellcheck, because - Currently shellcheck isn't installed by the tidy command unlike venv/node_modules. So it forces developers to take a extra task to enable pre-push hook - Spellcheck is built whenever I kick test tidy with the option. If I enables it, developers should wait extra time for running pre-push hook
2025-09-28Rollup merge of #147086 - Zalathar:payload, r=jieyouxuMatthias Krüger-14/+1
compiletest: Use `PanicHookInfo::payload_as_str` now that it's stable in beta Nice little FIXME cleanup after the bootstrap beta bump to 1.91 in https://github.com/rust-lang/rust/pull/146636. r? jieyouxu
2025-09-28Rollup merge of #147081 - moturus:fix_md, r=workingjubileeMatthias Krüger-1/+2
doc: fix a typo in platform-support.md Fix a typo.
2025-09-28Rollup merge of #146942 - yotamofek:pr/rustdoc/finish_deprecating_write_str, ↵Matthias Krüger-117/+90
r=GuillaumeGomez [rustdoc] Finish getting rid of usages `write_str` This PR, along with rust-lang/rust#146933 , get rid of all the last usages of the `write_str` fn that was introduced back in rust-lang/rust#136784 . This *shouldn't* be rolled up along with rust-lang/rust#146933 , since the later of the two to be merged will need to delete the no-longer-used `write_str` fn. Commits can be reviewed separately.
2025-09-28Rollup merge of #142139 - erickt:include-hashes, r=Mark-SimulacrumMatthias Krüger-512/+625
Include additional hashes in src/stage0 This patch changes `bump-stage0` to include: * The sha256 hash of the channel manifest used to create `src/stage0`. * The rust and rustfmt git commit in `src/stage0`. * Hashes of all the artifacts, like the source tarball, in `src/stage0`. Combined this will allow for: * Projects that bootstrap their own compiler, such as Fuchsia, or users of [bootstrap], to build their compilers offline without needing to communicate with static.rust-lang.org. * Auditors to detect if the channel manifest, and all the artifacts inside the manifest, were modified after it was used to generate `src/stage0`. Furthermore, if they did find modified artifacts, they could determine if the Rust Signing Key was compromised by checking if any modified file was signed properly. finally, it allows regeneration of `src/stage0` when specifying both the day of the build for rust, and the day of the build for rustfmt, which can allow a maintainer to regenerate `src/stage0` to verify nothing changed. [bootstrap]: https://github.com/dtolnay/bootstrap [mrustc]: https://github.com/thepowersgang/mrustc
2025-09-28Auto merge of #147045 - notriddle:search-index-entrydata-path, r=GuillaumeGomezbors-8/+32
rustdoc-search: use the same ID for entry and path to same item This decreases the size of the compiler-doc from 57MiB to 56MiB. r? `@GuillaumeGomez`
2025-09-28Add `all` `any` and `not` attribute completionsA4-Tacks-6/+56
Example --- `#[cfg($0)]` -> `#[cfg(any($0))]`
2025-09-27Auto merge of #147104 - matthiaskrgr:rollup-gap1v0w, r=matthiaskrgrbors-53/+117
Rollup of 8 pull requests Successful merges: - rust-lang/rust#146037 (Introduce CoerceShared lang item and trait, and basic Reborrow tests) - rust-lang/rust#146732 (tests: relax expectations after llvm change 902ddda120a5) - rust-lang/rust#147018 (re-order normalizations in run-make linker-warning test) - rust-lang/rust#147032 (Fix doctest compilation time display) - rust-lang/rust#147046 (Rename `rust.use-lld` to `rust.bootstrap-override-lld`) - rust-lang/rust#147050 (PassWrapper: update for new PGOOptions args in LLVM 22) - rust-lang/rust#147075 (Make `def_path_hash_to_def_id` not panic when passed an invalid hash) - rust-lang/rust#147076 (update issue number for more_float_constants) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-27Auto merge of #146927 - Kobzol:install-clif, r=jieyouxubors-52/+63
Make it possible to `x install` Cranelift and LLVM bitcode linker It was not possible to install these before, as they were not in the install step description list. Fixes: https://github.com/rust-lang/rust/issues/140331 r? `@jieyouxu`
2025-09-27Rollup merge of #147046 - Kobzol:bootstrap-ll, r=jieyouxuMatthias Krüger-50/+110
Rename `rust.use-lld` to `rust.bootstrap-override-lld` First part of https://github.com/rust-lang/rust/issues/146640. The old option is kept for backwards compatibility, we can remove it in ~6 months, as usually. I'm not sure if the bootstrap prefix is ideal, after all we have a bunch of other configs that only affect bootstrap's behavior and not the built artifacts. Maybe `build.override-lld`? But I don't think it matters that much, as long as it's clear that it is an override, and how does it differ from `rust.lld`. r? ``@jieyouxu``
2025-09-27Rollup merge of #147032 - ↵Matthias Krüger-3/+7
GuillaumeGomez:fix-doctest-compilation-time-display, r=lolbinarycat Fix doctest compilation time display Fixes rust-lang/rust#146960. Small corner case that happened in case everything went fine and there was only merged doctests. r? lolbinarycat
2025-09-27Add auto extra-checks in pre-push scriptShunpoco-1/+4
It enables automatic check changes of Python/C++/JS before pushing the changes to remote repository. Those checks happen only when the target type of file is changed. Otherwise it does not install any dependencies (venv and/or node_modules). Note that shellcheck and spellcheck are not included in this change, because: 1. Unlike venv/node_modules, shellcheck is not installed automatically by the command, and 2. spellcheck is built whenever pre-push script is run, it forces developer to wait extra time So not to break the current productivity, this commit skips them.
2025-09-27Re-enable assertions on macOSMads Marquart-12/+0
2025-09-27Update stage0 per previous commmitMark Rousskov-500/+522