about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-07-13Adjust `run_make_support::symbols` helpersJieyou Xu-25/+264
Massage the `symbols` helpers to fill out {match all, match any} x {substring match, exact match}: | | Substring match | Exact match | |-----------|----------------------------------------|-------------------------------| | Match any | `object_contains_any_symbol_substring` | `object_contains_any_symbol` | | Match all | `object_contains_all_symbol_substring` | `object_contains_all_symbols` | As part of this, rename `any_symbol_contains` to `object_contains_any_symbol_substring` for accuracy.
2025-07-13Auto merge of #140717 - mejrs:diagnostic_lints, r=oli-obkbors-59/+157
Split up the `unknown_or_malformed_diagnostic_attributes` lint This splits up the lint into the following lint group: - `unknown_diagnostic_attributes` - triggers if the attribute is unknown to the current compiler - `misplaced_diagnostic_attributes` - triggers if the attribute exists but it is not placed on the item kind it's meant for - `malformed_diagnostic_attributes` - triggers if the attribute's syntax or options are invalid - `malformed_diagnostic_format_literals` - triggers if the format string literal is invalid, for example if it has unpaired curly braces or invalid parameters - this pr doesn't create it, but future lints for things like deprecations can also go here. This PR does not start emitting lints in places that previously did not. ## Motivation I want to have finer control over what `unknown_or_malformed_diagnostic_attributes` does I have a project with fairly low msrv that is/will have a lower msrv than future diagnostic attributes. So lints will be emitted when I or others compile it on a lower msrv. At this time, there are two options to silence these lints: - `#[allow(unknown_or_malformed_diagnostic_attributes)]` - this risks diagnostic regressions if I (or others) mess up using the attribute, or if the attribute's syntax ever changes. - write a build script to detect the compiler version and emit cfgs, and then conditionally enable the attribute: ```rust #[cfg_attr(rust_version_99, diagnostic::new_attr_in_rust_99(thing = ..))]` struct Foo; ``` or conditionally `allow` the lint: ```rust // lib.rs #![cfg_attr(not(current_rust), allow(unknown_or_malformed_diagnostic_attributes))] ``` I like to avoid using build scripts if I can, so the following works much better for me. That is what this PR will let me do in the future: ```rust #[allow(unknown_diagnostic_attribute, reason = "attribute came out in rust 1.99 but msrv is 1.70")] #[diagnostic::new_attr_in_rust_99(thing = ..)]` struct Foo;
2025-07-12Auto merge of #143783 - bvanjoi:issue-143697-2, r=compiler-errorsbors-166/+162
compute all rpitit of a trait Fixes rust-lang/rust#143697 r? `@compiler-errors`
2025-07-12Clean up implementation of RPITIT assoc item loweringMichael Goulet-146/+110
2025-07-13query RPITIT in a trait or implbohan-151/+143
2025-07-13compute all rpitit of a traitbohan-57/+97
2025-07-12Auto merge of #143624 - tmiasko:copy-prop-borrowed, r=cjgillotbors-142/+97
Propagate from borrowed locals in CopyProp r? cjgillot
2025-07-12Auto merge of #143810 - matthiaskrgr:rollup-iw7a23z, r=matthiaskrgrbors-194/+432
Rollup of 9 pull requests Successful merges: - rust-lang/rust#143403 (Port several trait/coherence-related attributes the new attribute system) - rust-lang/rust#143633 (fix: correct assertion to check for 'noinline' attribute presence before removal) - rust-lang/rust#143647 (Clarify and expand documentation for std::sys_common dependency structure) - rust-lang/rust#143716 (compiler: doc/comment some codegen-for-functions interfaces) - rust-lang/rust#143747 (Add target maintainer information for aarch64-unknown-linux-musl) - rust-lang/rust#143759 (Fix typos in function names in the `target_feature` test) - rust-lang/rust#143767 (Bump `src/tools/x` to Edition 2024 and some cleanups) - rust-lang/rust#143769 (Remove support for SwitchInt edge effects in backward dataflow) - rust-lang/rust#143770 (build-helper: clippy fixes) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-12Auto merge of #143766 - matthiaskrgr:rollup-0x7t69s, r=matthiaskrgrbors-477/+1164
Rollup of 8 pull requests Successful merges: - rust-lang/rust#142391 (rust: library: Add `setsid` method to `CommandExt` trait) - rust-lang/rust#143302 (`tests/ui`: A New Order [27/N]) - rust-lang/rust#143303 (`tests/ui`: A New Order [28/28] FINAL PART) - rust-lang/rust#143568 (std: sys: net: uefi: tcp4: Add timeout support) - rust-lang/rust#143611 (Mention more APIs in `ParseIntError` docs) - rust-lang/rust#143661 (chore: Improve how the other suggestions message gets rendered) - rust-lang/rust#143708 (fix: Include frontmatter in -Zunpretty output ) - rust-lang/rust#143718 (Make UB transmutes really UB in LLVM) r? `@ghost` `@rustbot` modify labels: rollup try-job: i686-gnu-nopt-1 try-job: test-various
2025-07-12Auto merge of #143809 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 14 commits in 930b4f62cfcd1f0eabdb30a56d91bf6844b739bf..eabb4cd923deb73e714f7ad3f5234d68ca284dbe 2025-06-28 14:58:43 +0000 to 2025-07-09 22:07:55 +0000 - feat: Implementation and tests for `multiple-build-scripts` (rust-lang/cargo#15704) - perf: Speed up TOML parsing by upgrading toml (rust-lang/cargo#15736) - Mark cachelock tests that rely on interprocess blocking behaviour as unsupported on AIX. (rust-lang/cargo#15734) - feat(publish): Stabilize multi-package publishing (rust-lang/cargo#15636) - Update to Rust 2024 (rust-lang/cargo#15732) - Clarify package ID specifications in SBOMs are fully qualified (rust-lang/cargo#15731) - chore(deps): update cargo-semver-checks to v0.42.0 (rust-lang/cargo#15730) - test: Switch config tests to use snapshots (rust-lang/cargo#15729) - implement package feature unification (rust-lang/cargo#15684) - chore: Upgrade dependencies (rust-lang/cargo#15722) - Report valid file name when we can't find a build target for `name = "foo.rs"` (rust-lang/cargo#15707) - chore(release): Publish build-rs on release (rust-lang/cargo#15708) - Override `Cargo.lock` checksums when doing a dry-run `publish` (rust-lang/cargo#15711) - test(rustfix): Update for nightly (rust-lang/cargo#15717) r? ghost
2025-07-11Rollup merge of #143770 - hkBst:build-helper-cleanup, r=KobzolMatthias Krüger-26/+25
build-helper: clippy fixes
2025-07-11Rollup merge of #143769 - tmiasko:rm-backward-switch-int, r=lqdMatthias Krüger-48/+7
Remove support for SwitchInt edge effects in backward dataflow Those effects are untested and unused. Remove them along with the implementation of `BasicBlocks::switch_sources`.
2025-07-11Rollup merge of #143767 - hkBst:cleanup-x, r=jieyouxuMatthias Krüger-14/+10
Bump `src/tools/x` to Edition 2024 and some cleanups - Some clippy fixes - Bump `src/tools/x` to Edition 2024
2025-07-11Rollup merge of #143759 - fluiderson:rdttff, r=aDotInTheVoidMatthias Krüger-3/+3
Fix typos in function names in the `target_feature` test Seems like `test1` was copy-pasted but forgotten to be renamed after.
2025-07-11Rollup merge of #143747 - Gelbpunkt:aarch64-musl-maintainer, r=jieyouxuMatthias Krüger-1/+51
Add target maintainer information for aarch64-unknown-linux-musl Mentioning ``@famfo`` so that they can review the documentation. We're both very invested in this target; I originally promoted it to tier 2 with host tools in rust-lang/rust#76420 back in 2020.
2025-07-11Rollup merge of #143716 - ↵Matthias Krüger-10/+35
workingjubilee:document-some-codegen-backend-stuff, r=bjorn3,fee1-dead compiler: doc/comment some codegen-for-functions interfaces An out-of-date comment gets updated and some underdocumented functions get documented.
2025-07-11Rollup merge of #143647 - ColtenOuO:master, r=ChrisDentonMatthias Krüger-1/+1
Clarify and expand documentation for std::sys_common dependency structure This PR makes a minor improvement to the module-level documentation of std::sys_common: Replaces the lowercase “dag” with the more standard and explicit form “DAG (Directed Acyclic Graph)” for clarity.
2025-07-11Rollup merge of #143633 - dillona:noinline-assert, r=fee1-deadMatthias Krüger-1/+1
fix: correct assertion to check for 'noinline' attribute presence before removal
2025-07-11Rollup merge of #143403 - GrigorenkoPV:attributes/traits, r=jdonszelmannMatthias Krüger-90/+299
Port several trait/coherence-related attributes the new attribute system Part of rust-lang/rust#131229 This ports: - `#[const_trait]` - `#[rustc_deny_explicit_impl]` - `#[rustc_do_not_implement_via_object]` - `#[rustc_coinductive]` - `#[type_const]` - `#[rustc_specialization_trait]` - `#[rustc_unsafe_specialization_marker]` - `#[marker]` - `#[fundamental]` - `#[rustc_paren_sugar]` - `#[rustc_allow_incoherent_impl]` - `#[rustc_coherence_is_core]` This also changes `#[marker]` to error on duplicates instead of warning. cc rust-lang/rust#142838, but I don't think it matters too much, since it's unstable. r? ``@oli-obk``
2025-07-11Update cargoWeihang Lo-0/+0
2025-07-11Remove support for SwitchInt edge effects in backward dataflow analysesTomasz Miąsko-48/+7
Those effects are untested and unused. Remove them along with the implementation of `BasicBlocks::switch_sources`.
2025-07-11compiler: comment on some call-related codegen fn in cg_ssaJubilee Young-2/+29
Partially documents the situation due to LLVM CFI.
2025-07-11build-helper: clippy fixesMarijn Schouten-26/+25
2025-07-11Call `get_switch_int_data` on a block with SwitchInt terminatorTomasz Miąsko-1/+1
Fix a mix-up of a block with its predecessors in handling of SwitchInt edge effects for backward analysis. Note that this functionality is currently unused, so change has no practical impact.
2025-07-11x: use let-elseMarijn Schouten-5/+4
2025-07-11x: move to edition 2024Marijn Schouten-1/+1
2025-07-11x: clippy fixesMarijn Schouten-8/+5
2025-07-11Rollup merge of #143718 - scottmcm:ub-transmute-is-ub, r=WaffleLapkinMatthias Krüger-27/+34
Make UB transmutes really UB in LLVM Ralf suggested in <https://github.com/rust-lang/rust/pull/143410#discussion_r2184928123> that UB transmutes shouldn't be trapping, which happened for the one path *that* PR was changing, but there's another path as well, so *this* PR changes that other path to match. r? codegen
2025-07-11Rollup merge of #143708 - epage:pretty, r=compiler-errorsMatthias Krüger-39/+157
fix: Include frontmatter in -Zunpretty output In the implementation (rust-lang/rust#140035), this was left as an open question for the tracking issue (rust-lang/rust#136889). My assumption is that this should be carried over. The test was carried over from rust-lang/rust#137193 which was superseded by rust-lang/rust#140035. Thankfully, either way, `-Zunpretty` is unstable and we can always change it even if we stabilize frontmatter.
2025-07-11Rollup merge of #143661 - Muscraft:other-suggestion-message, r=estebankMatthias Krüger-14/+301
chore: Improve how the other suggestions message gets rendered Note: This change is part of my ongoing work to use `annotate-snippets` as `rustc`'s emitter This change started as a way to remove some specialty code paths from `annotate-snippets`, by making the "and {} other candidates" message get rendered like a secondary message with no level, but turned into a fix for the message's Unicode output. Before this change, when using the Unicode output, the other suggestions message would get rendered outside of the main suggestion block, making it feel disconnected from what it was referring to. This change makes it so that the message is on the last line of the block, aligning its rendering with other secondary messages, and making it clear what the message is referring to. Before: ``` error[E0433]: failed to resolve: use of undeclared type `IntoIter` ╭▸ $DIR/issue-82956.rs:28:24 │ LL │ let mut iter = IntoIter::new(self); │ ━━━━━━━━ use of undeclared type `IntoIter` ╰╴ help: consider importing one of these structs ╭╴ LL + use std::array::IntoIter; ├╴ LL + use std::collections::binary_heap::IntoIter; ├╴ LL + use std::collections::btree_map::IntoIter; ├╴ LL + use std::collections::btree_set::IntoIter; ╰╴ and 9 other candidates ``` After: ``` error[E0433]: failed to resolve: use of undeclared type `IntoIter` ╭▸ $DIR/issue-82956.rs:28:24 │ LL │ let mut iter = IntoIter::new(self); │ ━━━━━━━━ use of undeclared type `IntoIter` ╰╴ help: consider importing one of these structs ╭╴ LL + use std::array::IntoIter; ├╴ LL + use std::collections::binary_heap::IntoIter; ├╴ LL + use std::collections::btree_map::IntoIter; ├╴ LL + use std::collections::btree_set::IntoIter; │ ╰ and 9 other candidates ```
2025-07-11Rollup merge of #143611 - GrigorenkoPV:ParseIntError, r=tgross35Matthias Krüger-2/+5
Mention more APIs in `ParseIntError` docs Fixes rust-lang/rust#143602 r? `@lolbinarycat` `@rustbot` label +A-docs
2025-07-11Rollup merge of #143568 - Ayush1325:uefi-tcp4-timeout, r=tgross35Matthias Krüger-25/+97
std: sys: net: uefi: tcp4: Add timeout support - Implement timeout support for read, write and connect. - A software implementation using Instant.
2025-07-11Rollup merge of #143303 - Kivooeo:tf28, r=tgross35Matthias Krüger-197/+262
`tests/ui`: A New Order [28/28] FINAL PART > [!NOTE] > > Intermediate commits are intended to help review, but will be squashed prior to merge. Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895. r? ``@tgross35``
2025-07-11Rollup merge of #143302 - Kivooeo:tf27, r=tgross35Matthias Krüger-173/+219
`tests/ui`: A New Order [27/N] > [!NOTE] > > Intermediate commits are intended to help review, but will be squashed prior to merge. Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895. r? ``@tgross35``
2025-07-11Rollup merge of #142391 - LevitatingBusinessMan:setsid, r=workingjubileeMatthias Krüger-0/+89
rust: library: Add `setsid` method to `CommandExt` trait Add a setsid method to the CommandExt trait so that callers can create a process in a new session and process group whilst still using the POSIX spawn fast path. Tracking issue: rust-lang/rust#105376 ACP: https://github.com/rust-lang/libs-team/issues/184 This PR was previously submitted by ``@HarveyHunt`` (whom I marked as Co-Author in the commit message) in rust-lang/rust#105377. However that PR went stale. I applied the [suggestion](https://github.com/rust-lang/rust/pull/105377/files/231d19fcbfe155b2e85116865adae4253380ff1f#r1893457943) to change the function signature to `fn setsid(&mut self, setsid: bool) -> &mut Command`.
2025-07-11Auto merge of #142911 - mejrs:unsized, r=compiler-errorsbors-94/+163
Remove support for dynamic allocas Followup to rust-lang/rust#141811
2025-07-11docs: clarify “dag” in std::sys_common doc commentColten-1/+1
2025-07-11Auto merge of #143762 - tgross35:rollup-n9t27c6, r=tgross35bors-773/+816
Rollup of 7 pull requests Successful merges: - rust-lang/rust#140136 (Add an aarch64-msvc build running on ARM64 Windows) - rust-lang/rust#143642 (stdarch subtree update) - rust-lang/rust#143707 (Fix `--skip-std-check-if-no-download-rustc`) - rust-lang/rust#143722 (Make some "safe" llvm ops actually sound) - rust-lang/rust#143728 (Resolve refactor: extraction of `finalize_module_binding` and `single_import_can_define_name`) - rust-lang/rust#143742 (Rework borrowing suggestions to use `Expr` instead of just `Span`) - rust-lang/rust#143744 (Properly track the depth when expanding free alias types) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-10Rollup merge of #143744 - fmease:lta-expand-proper-depth, r=compiler-errorsTrevor Gross-2/+24
Properly track the depth when expanding free alias types Decrease the depth after the fold so as not to affect the depth for unrelated same-level constituent types. My bad. Fixes rust-lang/rust#142419.
2025-07-10Rollup merge of #143742 - estebank:borrow-suggestion, r=compiler-errorsTrevor Gross-179/+316
Rework borrowing suggestions to use `Expr` instead of just `Span` In the suggestion machinery for borrowing expressions and types, always use the available obligation `Span` to find the appropriate `Expr` to perform appropriateness checks no the `ExprKind` instead of on the textual snippet corresponding to the `Span`. (We were already doing this, but only for a subset of cases.) This now better handles situations where parentheses and `<>` are needed for correct syntax (`&(foo + bar)`, `(&foo).bar()`, `<&Foo>::bar()`, etc.). Unify the logic for the case where `&` *and* `&mut` are appropriate with the logic for only one of those cases. (Instead of having two branches for emitting the suggestion, we now have a single one, using `Diag::multipart_suggestions` always.) Handle the case when `S::foo()` should have been `<&S>::foo()` (instead of suggesting the prior `&S::foo()`. Fix rust-lang/rust#143393. Make `Diag::multipart_suggestions` always verbose. CC rust-lang/rust#141973.
2025-07-10Rollup merge of #143728 - LorrensP-2158466:refactor-resolve-extraction, ↵Trevor Gross-118/+143
r=petrochenkov Resolve refactor: extraction of `finalize_module_binding` and `single_import_can_define_name` This pr the work Vadim asked for in https://github.com/rust-lang/rust/pull/142547#issuecomment-3001339385. This part: > finalize_module_binding/single_import_can_define_name extraction Cherry-picked commits of b-naber. Extraction of 2 processes in `resolve_ident_in_module_unadjusted`: - `finalize_module_binding` - `single_import_can_define_name` r? ```@petrochenkov```
2025-07-10Rollup merge of #143722 - oli-obk:sound-llvm, r=dianqkTrevor Gross-7/+9
Make some "safe" llvm ops actually sound Noticed while doing other refactorings it may cause some extra unnecessary allocations, but the current use sites are rare ones anyway
2025-07-10Rollup merge of #143707 - Kobzol:bootstrap-std-check, r=jieyouxuTrevor Gross-7/+31
Fix `--skip-std-check-if-no-download-rustc` Since https://github.com/rust-lang/rust/pull/143048, we now explicitly set the build compiler for `check::Std`, which caused it to be built before we checked `--skip-std-check-if-no-download-rustc`. So I moved the check earlier to `make_run`, which resolves it. I also added a regression test for this. Sadly we can't really test for the positive case easily (when download-ci-rustc is enabled), but we can test the negative cases, where it is disabled. Fixes: https://github.com/rust-lang/rust/issues/143705 r? ```@RalfJung```
2025-07-10Rollup merge of #143642 - Kobzol:stdarch-push, r=AmanieuTrevor Gross-455/+243
stdarch subtree update Subtree update of `stdarch` to https://github.com/rust-lang/stdarch/commit/b262a9af852cb30928bb44c62c2c3fa92246bbeb. Created using https://github.com/rust-lang/josh-sync. r? ```@ghost```
2025-07-10Rollup merge of #140136 - dpaoliello:arm64winci, r=KobzolTrevor Gross-5/+50
Add an aarch64-msvc build running on ARM64 Windows Resurrecting rust-lang/rust#126341 Per <https://github.com/rust-lang/rfcs/pull/3817> we intend to promote `aarch64-pc-windows-msvc` to Tier 1. As part of that work, we are adding a pre-merge CI job to validate that changes do not break this target. Additionally, for consistency, the `dist-aarch64-msvc` job will also be run on Arm64 Windows runners. r? ``@Kobzol`` try-job: `*aarch64-msvc*`
2025-07-11fix typos in function names in the `target_feature` testFluid-3/+3
2025-07-11Split up the `unknown_or_malformed_diagnostic_attributes` lintmejrs-59/+157
2025-07-10Auto merge of #143746 - matthiaskrgr:rollup-yaojj7t, r=matthiaskrgrbors-767/+648
Rollup of 9 pull requests Successful merges: - rust-lang/rust#143446 (use `--dynamic-list` for exporting executable symbols) - rust-lang/rust#143590 (Fix weird rustdoc output when single and glob reexport conflict on a name) - rust-lang/rust#143599 (emit `.att_syntax` when global/naked asm use that option) - rust-lang/rust#143615 (Fix handling of no_std targets in `doc::Std` step) - rust-lang/rust#143632 (fix: correct parameter names in LLVMRustBuildMinNum and LLVMRustBuildMaxNum FFI declarations) - rust-lang/rust#143640 (Constify `Fn*` traits) - rust-lang/rust#143651 (Win: Use exceptions with empty data for SEH panic exception copies instead of a new panic) - rust-lang/rust#143660 (Disable docs for `compiler-builtins` and `sysroot`) - rust-lang/rust#143665 ([rustdoc-json] Add tests for `#[doc(hidden)]` handling of items.) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-10Add target maintainer information for aarch64-unknown-linux-muslJens Reidel-1/+51
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2025-07-10Rollup merge of #143665 - obi1kenobi:pg/doc-hidden-tests, r=aDotInTheVoidMatthias Krüger-0/+36
[rustdoc-json] Add tests for `#[doc(hidden)]` handling of items. Add tests which check: - `#[doc(hidden)]` items are not present in rustdoc JSON output by default. - Invoking rustdoc with `--document-hidden-items` makes `#[doc(hidden)]` items appear, and they show their `#[doc(hidden)]` status appropriately. r? `@aDotInTheVoid`