about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-03-15Merge pull request #4227 from rust-lang/rustup-2025-03-15Ben Kimock-464/+1272
Automatic Rustup
2025-03-15Merge from rustcThe Miri Cronjob Bot-463/+1271
2025-03-18Refactor YieldKind so postfix yield must have an expressionEric Holk-30/+65
2025-03-18Apply suggestions from code reviewEric Holk-2/+2
Co-authored-by: Travis Cross <tc@traviscross.com>
2025-03-17Teach rustfmt to handle postfix yieldEric Holk-24/+23
This involved fixing the span when parsing .yield
2025-03-15Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-03-14Fix clippyEric Holk-1/+1
2025-03-14Teach rustfmt to handle postfix yieldEric Holk-4/+33
2025-03-14Preserve yield position during pretty printingEric Holk-18/+55
2025-03-14Add support for postfix yield expressionsEric Holk-0/+41
We had a discussion[1] today about whether postfix yield would make sense. It's easy enough to support both in the parser, so we might as well have both and see how people use it while the feature is experimental. [1]: https://rust-lang.zulipchat.com/#narrow/channel/481571-t-lang.2Fgen/topic/postfix-yield/with/505231568
2025-03-14Auto merge of #137424 - Ayush1325:uefi-path-node, r=nicholasbishop,cuviperbors-0/+179
uefi: helpers: Add DevicePathNode abstractions - UEFI device path is a series of nodes layed out in a contiguous memory region. So it makes sense to use Iterator abstraction for modeling DevicePaths - This PR has been split off from #135368 for easier review. The allow dead_code will be removed in #135368 cc `@nicholasbishop`
2025-03-14Auto merge of #138480 - jhpratt:rollup-y3b8wu5, r=jhprattbors-212/+488
Rollup of 16 pull requests Successful merges: - #136001 (Overhaul examples for PermissionsExt) - #136230 (Reword incorrect documentation about SocketAddr having varying layout) - #136892 (Sync Fuchsia target spec with clang Fuchsia driver) - #136911 (Add documentation URL to selected jobs) - #137870 ( Improve HashMap docs for const and static initializers) - #138179 (Add `src/tools/x` to the main workspace) - #138389 (use `expect` instead of `allow`) - #138396 (Enable metrics and verbose tests in PR CI) - #138398 (atomic intrinsics: clarify which types are supported and (if applicable) what happens with provenance) - #138432 (fix: remove the check of lld not supporting `@response-file)` - #138434 (Visit `PatField` when collecting lint levels) - #138441 (update error message) - #138442 (EUV: fix place of deref pattern's interior's scrutinee) - #138457 (Remove usage of legacy scheme paths on RedoxOS) - #138461 (Remove an outdated line from a test comment) - #138466 (Remove myself from libs review) Failed merges: - #138452 (Remove `RUN_CHECK_WITH_PARALLEL_QUERIES`) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-14Rollup merge of #138466 - cuviper:libs-review, r=jieyouxuJacob Pratt-1/+0
Remove myself from libs review Trying to re-balance my work by reducing reviews for now.
2025-03-14Rollup merge of #138461 - WaffleLapkin:indate-comment, r=ehussJacob Pratt-1/+0
Remove an outdated line from a test comment They *used* to not work, however this was fixed in the PR that added the test. I forgot to remove this line or possibly lost its removal while rebasing. r? `@ehuss`
2025-03-14Rollup merge of #138457 - bjorn3:redox_scheme_paths, r=NoratriebJacob Pratt-14/+8
Remove usage of legacy scheme paths on RedoxOS The `name:/path` path syntax is getting phased out[^1] in favor of `/scheme/name/path`. Also using `null:` is no longer necessary as `/dev/null` is available on Redox OS too. [^1]: https://gitlab.redox-os.org/redox-os/rfcs/-/blob/master/text/0006-scheme-path.md cc `@jackpot51`
2025-03-14Rollup merge of #138442 - dianne:deref-pat-euv-fix, r=compiler-errorsJacob Pratt-13/+17
EUV: fix place of deref pattern's interior's scrutinee The place previously used here was that of the temporary holding the reference returned by `Deref::deref` or `DerefMut::deref_mut`. However, since the inner pattern of `deref!(inner)` expects the deref-target type itself, this would ICE when that type was inspected (e.g. by the EUV case for slice patterns). This adds a deref projection to fix that. Since current in-tree consumers of EUV (upvar inference and clippy) don't care about Rvalues, the place could be simplified to `self.cat_rvalue(pat.hir_id, self.pat_ty_adjusted(subpat)?)` to save some cycles. I personally find EUV to be a bit fragile, so I've opted for pedantic correctness. Maybe a `HACK` comment would suffice though? Fixes #125059 r? `@compiler-errors`
2025-03-14Rollup merge of #138441 - tshepang:patch-5, r=jieyouxuJacob Pratt-1/+1
update error message [`compile-pass` has since been renamed to `build-pass`](https://github.com/rust-lang/rust/issues/62277)
2025-03-14Rollup merge of #138434 - compiler-errors:lint-level-pat-field, r=jieyouxuJacob Pratt-0/+26
Visit `PatField` when collecting lint levels Fixes #138428 Side-note, I vaguely skimmed over the other nodes we could be visiting here and it doesn't *seem* to me that we're missing anything, though I may be mistaken given recent(?) support for attrs in where clauses(??). Can be fixed in a follow-up PR.
2025-03-14Rollup merge of #138432 - weihanglo:lld, r=lqdJacob Pratt-7/+0
fix: remove the check of lld not supporting @response-file In LLVM v9, lld has supported `@response-file.` LLVM v9 was released on 2019-09-19. The check was added back to 2018-03-14 (1.26.0) via 04442af18bf0. It has been more than five years, and we ship our own lld regardlessly. This should be happily removed. See also: * <https://github.com/llvm/llvm-project/commit/bb12396f9175eaf4586d8e5c76441977d97ccf93> * <https://reviews.llvm.org/D63024>
2025-03-14Rollup merge of #138398 - RalfJung:atomic-intrinsics-provenance, r=nnethercoteJacob Pratt-9/+190
atomic intrinsics: clarify which types are supported and (if applicable) what happens with provenance The provenance semantics match what Miri implements and what the `AtomicPtr` API expects.
2025-03-14Rollup merge of #138396 - Kobzol:ci-metrics, r=marcoieniJacob Pratt-14/+5
Enable metrics and verbose tests in PR CI When debugging CI, I relatively often need to examine what tests are executed on PR CI, and what bootstrap steps does it execute. However, we currently disable both verbose tests and bootstrap metrics on PR CI for some reason. I'm not actually sure why though, as the PR that (probably) introduced this behavior (https://github.com/rust-lang/rust/pull/51367) didn't explain why. CC `@oli-obk`
2025-03-14Rollup merge of #138389 - onur-ozkan:use-expect, r=jieyouxuJacob Pratt-16/+13
use `expect` instead of `allow` This is more useful than `allow` as compiler will force us to remove rules that are no longer valid (we already got a few of them in this change).
2025-03-14Rollup merge of #138179 - cuviper:x, r=jieyouxuJacob Pratt-44/+40
Add `src/tools/x` to the main workspace The original reason to exclude it was so it could run before submodules were initialized. However, those have all been converted to subtrees now, so the entire workspace is always ready to go. I've also alphabetized the workspace members, as it was an untidy mess. :broom:
2025-03-14Rollup merge of #137870 - karolzwolak:lazylock-const-hashmaps-137566, r=cuviperJacob Pratt-7/+19
Improve HashMap docs for const and static initializers Closes #137566. I clarified the HashMap usage in const and static initializers. I also added examples of how to construct such HashMaps wrapped in LazyLock.
2025-03-14Rollup merge of #136911 - Kobzol:ci-helper-link, r=marcoieniJacob Pratt-3/+28
Add documentation URL to selected jobs This PR adds the possibility to attach URLs to selected CI jobs, which are then printed at the end of the CI log when a failure happens in that job. The motivation is to allow contributors to find how to fix the specific jobs more quickly. This was proposed on [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Automatic.20useful.20links.20when.20a.20particular.20CI.20job.20fails.3F). An example output can be seen [here](https://github.com/rust-lang/rust/actions/runs/13836290091/job/38712112523?pr=136911). r? `@ghost`
2025-03-14Rollup merge of #136892 - erickt:fuchsia-target, r=jieyouxuJacob Pratt-22/+45
Sync Fuchsia target spec with clang Fuchsia driver This updates the Fuchsia target spec with the [Clang Fuchsia driver], which picks up a few changes: * Adds `-z start-stop-visibility=hidden` and `-z rel` to the pre link arguments. * Adds `--execute-only` and `--fix-cortex-a53-843419` for `aarch64-unknown-fuchsia`. * Enables the equivalent cpu features for `x86-64-v2` for `x86_64-unknown-fuchsia`, which is our minimum supported x86_64 platform according to [RFC-0073]. try-job: x86_64-fuchsia [Clang Fuchsia driver]: https://github.com/llvm/llvm-project/blob/8374d421861cd3d47e21ae7889ba0b4c498e8d85/clang/lib/Driver/ToolChains/Fuchsia.cpp [RFC-0073]: https://fuchsia.dev/fuchsia-src/contribute/governance/rfcs/0073_x86_64_platform_requirement
2025-03-14Rollup merge of #136230 - clarfonthey:net-memory-layout-assumptions, r=cuviperJacob Pratt-11/+21
Reword incorrect documentation about SocketAddr having varying layout This has no longer been the case since these types were moved to `core`. The note on portability remains, but it is reworded to not imply that the size varies by target.
2025-03-14Rollup merge of #136001 - hkBst:patch-21, r=cuviperJacob Pratt-49/+75
Overhaul examples for PermissionsExt This fixes #91707 by including one overarching example, instead of the small examples that can be misleading.
2025-03-14Merge pull request #4226 from rust-lang/rustup-2025-03-14Ben Kimock-7318/+10015
Automatic Rustup
2025-03-14Merge from rustcThe Miri Cronjob Bot-7317/+10014
2025-03-14Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-03-14Auto merge of #138157 - scottmcm:inline-more-tiny-things, r=oli-obkbors-231/+443
Allow more top-down inlining for single-BB callees This means that things like `<usize as Step>::forward_unchecked` and `<PartialOrd for f32>::le` will inline even if we've already done a bunch of inlining to find the calls to them. Fixes #138136 ~~Draft as it's built atop #138135, which adds a mir-opt test that's a nice demonstration of this. To see just this change, look at <https://github.com/rust-lang/rust/pull/138157/commits/48f63e3be552605c2933056b77bf23a326757f92>~~ Rebased to be just the inlining change, as the other existing tests show it great.
2025-03-14Auto merge of #138391 - scottmcm:SSA-discriminants, r=WaffleLapkinbors-167/+186
Don't `alloca` just to look at a discriminant Today we're making LLVM do a bunch of extra work when you match on trivial stuff like `Option<bool>` or `ControlFlow<u8>`. This PR changes that so that simple types like `Option<u32>` or `Result<(), Box<Error>>` can stay as `OperandValue::ScalarPair` and we can still read the discriminant from them, rather than needing to write them into memory to have a `PlaceValue` just to get the discriminant out. Fixes #137503
2025-03-13Remove has_redox_schemebjorn3-11/+2
Redox OS is moving away from name:/path style paths to /scheme/name/path style paths which are already handled correctly without has_redox_scheme.
2025-03-13Auto merge of #138459 - matthiaskrgr:rollup-hddfg18, r=matthiaskrgrbors-717/+366
Rollup of 8 pull requests Successful merges: - #138126 (Add an opt-out in pretty printing for RTN rendering) - #138399 (Delegation: allow foreign fns `reuse`) - #138406 (Update mdbook to 0.4.47) - #138417 (minor interpreter cleanups) - #138420 (Adapt to LLVM dropping CfiFunctionIndex::begin()/end()) - #138423 (Don't emit error within cast function, propagate it as a `CastError`) - #138425 (Remove `feature = "hash_raw_entry"`) - #138427 (Fix RISC-V VxWorks LLVM target triples) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-13Record the new settings checksumsJosh Stone-3/+7
2025-03-13Remove separate `src/tools/x` from rust-analyzer settingsJosh Stone-4/+0
2025-03-13Alphabetize the root workspace membersJosh Stone-24/+28
2025-03-13Add `src/tools/x` to the main workspaceJosh Stone-13/+5
The original reason to exclude it was so it could run before submodules were initialized. However, those have all been converted to subtrees now, so the entire workspace is always ready to go.
2025-03-13Remove myself from libs reviewJosh Stone-1/+0
Trying to re-balance my work by reducing reviews for now.
2025-03-13Remove an outdated line from a test commentWaffle Lapkin-1/+0
They *used* to not work, however this was fixed in the PR that added the test. I forgot to remove this line or possibly lost its removal while rebasing.
2025-03-13Rollup merge of #138427 - madsmtm:vxworks-llvm-target, r=jieyouxuMatthias Krüger-2/+2
Fix RISC-V VxWorks LLVM target triples The targets `riscv32-wrs-vxworks` and `riscv64-wrs-vxworks` uses the plain `$ARCH` LLVM triple, which LLVM normalizes to `$ARCH-unknown-unknown`, we should use `$ARCH-unknown-linux-gnu$ABI` which is consistent with the the other VxWorks targets. Motivation: To make it easier to verify that [`cc-rs`' conversion from `rustc` to Clang/LLVM triples](https://github.com/rust-lang/cc-rs/issues/1431) is correct. Alternative: Pass `$ARCH-unknown-none` in the other VxWorks LLVM triples, I don't know anything about VxWorks, so am unsure which is the most correct option. CC target maintainer `@biabbas.` r? jieyouxu
2025-03-13Rollup merge of #138425 - cuviper:remove-hash_raw_entry, r=jhprattMatthias Krüger-564/+0
Remove `feature = "hash_raw_entry"` The `hash_raw_entry` feature finished [fcp-close](https://github.com/rust-lang/rust/issues/56167#issuecomment-2293805510) back in August, and its remaining uses in the compiler have now been removed, so we should be all clear to remove it from `std`. Closes #56167
2025-03-13Rollup merge of #138423 - compiler-errors:delay-emit, r=WaffleLapkinMatthias Krüger-14/+19
Don't emit error within cast function, propagate it as a `CastError` Minor nitpick from #136764. r? `@WaffleLapkin`
2025-03-13Rollup merge of #138420 - zmodem:cfifunctionindex_fix, r=durin42Matthias Krüger-0/+9
Adapt to LLVM dropping CfiFunctionIndex::begin()/end() After https://github.com/llvm/llvm-project/pull/130382, RustWrapper needs to call CfiFunctionIndex::symbols() instead.
2025-03-13Rollup merge of #138417 - RalfJung:interpret-cleanup, r=oli-obkMatthias Krüger-91/+85
minor interpreter cleanups - remove the `eval_inline_asm` hook that `@saethlin` added; the usage never materialized and he agreed with removing it - I tried merging `init_alloc_extra` and `adjust_global_allocation` and it didn't work; leave a comment as to why. Also, make the allocation code path a bit more clear by renaming `init_alloc_extra` to `init_local_allocation`. r? `@oli-obk`
2025-03-13Rollup merge of #138406 - ehuss:update-mdbook, r=jieyouxuMatthias Krüger-3/+12
Update mdbook to 0.4.47 This updates mdbook to bring in an important fix that enables the `output.html.hash-files` option to deal with network caching. Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0446 https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0447
2025-03-13Rollup merge of #138399 - Bryanskiy:delegation-extern-fn, r=petrochenkovMatthias Krüger-13/+87
Delegation: allow foreign fns `reuse` In example: ```rust unsafe extern "C" { fn foo(); } reuse foo as bar; ``` Desugaring before: ```rust fn bar() { foo() //~^ ERROR call to unsafe function `foo` is unsafe and requires unsafe function or block } ``` after: ```rust unsafe extern "C" fn bar() { foo() } ``` Fixes https://github.com/rust-lang/rust/issues/127412 r? `@petrochenkov`
2025-03-13Rollup merge of #138126 - compiler-errors:rtn-for-sugg, r=oli-obkMatthias Krüger-30/+152
Add an opt-out in pretty printing for RTN rendering Today, we render RPITIT types like `impl Sized { T::method(..) }` when RTN is enabled. This is very useful for diagnostics, since it's often not clear what the `impl Sized` type means by itself, and it makes it clear that that's an RPITIT that can be bounded using RTN syntax. See #115624. However, since we don't distinguish types that are rendered for the purposes of printing messages vs suggestions, this representation leaks into suggestions and turns into code that can't be parsed. This PR adds a new `with_types_for_suggestion! {}` and `with_types_for_signature! {}` options to the pretty printing architecture to make it clear that we're rendering a type for code suggestions. This can be applied later as we find that we need it.
2025-03-13Auto merge of #137152 - saethlin:bss-const-allocs, r=wesleywiserbors-4/+117
Add a .bss-like scheme for encoded const allocs This check if all bytes are zero feel like it should be too slow, and instead we should have a flag that we track, but that seems hard. Let's see how this perfs first. Also we can probably stash the "it's all zero actually" flag inside one of the other struct members that's already not using an entire byte. This optimization doesn't fire all that often, so it's possible that by sticking it in the varint length field, this PR actually makes rmeta size worse.