about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-10-02Auto merge of #147055 - beepster4096:subtype_is_not_a_projection, r=lcnrbors-2/+2
Turn ProjectionElem::Subtype into CastKind::Subtype I noticed that drop elaboration can't, in general, handle `ProjectionElem::SubType`. It creates a disjoint move path that overlaps with other move paths. (`Subslice` does too, and I'm working on a different PR to make that special case less fragile.) If its skipped and treated as the same move path as its parent then `MovePath.place` has multiple possible projections. (It would probably make sense to remove all `Subtype` projections for the canonical place but it doesn't make sense to have this special case for a problem that doesn't actually occur in real MIR.) The only reason this doesn't break is that `Subtype` is always the sole projection of the local its applied to. For the same reason, it works fine as a `CastKind` so I figured that makes more sense than documenting and validating this hidden invariant. cc rust-lang/rust#112651, rust-lang/rust#133258 r? Icnr (bc you've been the main person dealing with `Subtype` it looks like)
2025-10-01Auto merge of #147210 - lnicola:sync-from-ra, r=lnicolabors-1519/+3736
`rust-analyzer` subtree update Subtree update of `rust-analyzer` to https://github.com/rust-lang/rust-analyzer/commit/a6bc4a4bbe6a65b71cbf76a0cf528c47a8d9f97f. Created using https://github.com/rust-lang/josh-sync. r? `@ghost`
2025-10-01Auto merge of #147235 - matthiaskrgr:rollup-a0es1x9, r=matthiaskrgrbors-3/+4
Rollup of 8 pull requests Successful merges: - rust-lang/rust#146593 (Allow specifying multiple bounds for same associated item, except in trait objects) - rust-lang/rust#147177 ([DebugInfo] Fix MSVC tuple child creation) - rust-lang/rust#147195 (iter repeat: add tests for new count and last behavior) - rust-lang/rust#147202 (Swap order of `resolve_coroutine_interiors` and `handle_opaque_type_uses`) - rust-lang/rust#147204 (Refactor ArrayWindows to use a slice) - rust-lang/rust#147219 (Add proper error handling for closure in impl) - rust-lang/rust#147226 (include `outer_inclusive_binder` of pattern types) - rust-lang/rust#147230 (Fix typo in 'unfulfilled_lint_expectation' to plural) r? `@ghost` `@rustbot` modify labels: rollup
2025-10-01Rollup merge of #147230 - demoray:patch-1, r=jdonszelmannMatthias Krüger-1/+1
Fix typo in 'unfulfilled_lint_expectation' to plural
2025-10-01Rollup merge of #147177 - Walnut356:tuples, r=Mark-SimulacrumMatthias Krüger-2/+3
[DebugInfo] Fix MSVC tuple child creation This is a fix for the debugger visualizer scripts For whatever reason, using `CreateChildAtOffset` on the child element sometimes caused issues with pointers (and maybe some other types). The resulting child's memory would be a block 4 bytes too far forward. Creating the child off of the parent `valobj` and using the type definition to get the correct offset seems to fix that. Before: <img width="489" height="136" alt="image" src="https://github.com/user-attachments/assets/fb4cb95c-f199-49a6-8eba-6d3ff486b69a" /> After: <img width="518" height="145" alt="image" src="https://github.com/user-attachments/assets/3f50dbc3-19ca-4fd8-87c5-b4be295f6e7c" /> This shouldn't affect any tests as we don't run debuginfo tests for MSVC afaik
2025-10-01Fix typo in 'unfulfilled_lint_expectation' to pluralBrian Caswell-1/+1
2025-10-01Rollup merge of #147189 - yotamofek:pr/rustdoc/highlight-optimizations-2, ↵Stuart Cook-19/+80
r=GuillaumeGomez Replace `rustc_span::Span` with a stripped down version for librustdoc's highlighter While profiling rustdoc's syntax highlighter, I noticed a lot of time being spent in the `Span` interner, due to the highlighter creating a lot of (new) spans. Since the only data from the `Span` that we use is the `hi` and `lo` byte positions - I replaced the regular `Span` with a simple one with two fields, and in my benchmarks it seemed to make a big dent in the highlighter's perf, so thought I would see what the perf runner says.
2025-10-01Rollup merge of #147188 - Kobzol:remove-compiletest-stage-1, r=Zalathar,jieyouxuStuart Cook-5/+1
Remove usage of `compiletest-use-stage0-libtest` from CI It shouldn't be needed anymore after https://github.com/rust-lang/rust/pull/146929. r? `@Zalathar`
2025-10-01Rollup merge of #147170 - Zalathar:directive, r=jieyouxuStuart Cook-177/+128
compiletest: Pass around `DirectiveLine` instead of bare strings This is an incremental step towards being able to clean up and centralize compiletest directive parsing. My original plan was to add features to `DirectiveLine`, and then gradually migrate parsing code to use those features. However, that turned out to be impractical, because of how the existing directive parsers call each other. So instead this PR focuses on getting them to all take `DirectiveLine` instead of bare strings, to enable incremental work in the future. Because this is part of an ongoing cleanup, I've prioritised clean diffs over nice code, because much of this code is going to be modified again when `DirectiveLine` is more capable. r? jieyouxu
2025-09-30Replace `rustc_span::Span` with a stripped down version for librustdoc's ↵Yotam Ofek-18/+65
highlighter
2025-09-30Rollup merge of #147172 - notriddle:tooldoc, r=KobzolMatthias Krüger-18/+21
bootstrap: build bootstrap docs with in-tree rustdoc All of the docs need to be built with the same rustdoc. Otherwise, any change to the search index breaks everything, because the two rustdocs don't agree on the format. Fixes https://github.com/rust-lang/rust/issues/147142
2025-09-30Add `#[bench]` for librustdoc's syntax highlighterYotam Ofek-1/+15
2025-09-30bootstrap: build bootstrap docs with in-tree rustdocMichael Howell-18/+21
All of the docs need to be built with the same rustdoc. Otherwise, any change to the search index breaks everything, because the two rustdocs don't agree on the format.
2025-09-30Add regression test for another (long-standing) bug fixed by the new solverChayim Refael Friedman-1/+23
2025-09-30Remove usage of `compiletest-use-stage0-libtest` from CIJakub Beránek-5/+1
2025-09-30Impl `std::error::Error` for `SyntaxError`Chayim Refael Friedman-0/+2
2025-09-30Rollup merge of #147167 - jyn514:rustdoc-tests, r=KobzolStuart Cook-9/+3
Don't condition RUSTDOC_LIBDIR on `--no-doc` 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-30fix tuple child creationWalnut-2/+3
2025-09-30Merge pull request #20745 from ↵Shoyu Vanilla (Flint)-1/+55
Oblarg/fix-negative-int-literals-in-macro-by-example Fix negative integer literals in const generics in declarative macro context
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.