about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-05-27Rollup merge of #141582 - RalfJung:cleanup, r=bjorn3Michael Goulet-28/+60
intrinsics, ScalarInt: minor cleanup Taken out of https://github.com/rust-lang/rust/pull/141507 while we resolve technical disagreements in that PR. r? ``@bjorn3``
2025-05-27Rollup merge of #141580 - oli-obk:early-dyn-catches-the-incompat, ↵Michael Goulet-206/+205
r=compiler-errors Use more detailed spans in dyn compat errors within bodies Within bodies we can employ the full dyn compat check query instead of only doing the minimal hir ty lowerer one. This in turn gives us better spans and also silences many follow-up duplicate or bogus errors. alternative to https://github.com/rust-lang/rust/pull/141439, tho I think I could turn the delayed bug from that one into a bug now instead of having an error code path. r? `@compiler-errors` cc `@fmease`
2025-05-27Rollup merge of #141568 - onur-ozkan:141393-fix, r=KobzolMichael Goulet-0/+8
dist: make sure llvm-project submodule is present Zero-config `x install` fails when bootstrap tries to copy files from the LLVM submodule because it's not properly initialized/handled. This diff handles that. Fixes https://github.com/rust-lang/rust/issues/141393
2025-05-27Rollup merge of #141563 - nnethercote:rm-noop, r=petrochenkovMichael Goulet-23/+5
Remove out-of-date `noop_*` names. `mut_visit.rs` has a single function with a `noop_` prefix: `noop_filter_map_expr`. This commit renames as `walk_filter_map_expr` which is consistent with other functions in this file. The commit also removes out-of-date comments that refer to `noop_*` methods. r? `@petrochenkov`
2025-05-27Rollup merge of #141556 - jeremyd2019:patch-1, r=jieyouxuMichael Goulet-1/+3
bootstrap: translate Windows paths in a way that works for both Cygwin and MSYS2 Cygwin defaults to rooting Windows paths in /cygdrive/X, while MSYS2 configures them to be /X. Regardless of configuration, drives are always accessible as /proc/cygdrive/X, so use that. If there are other shells on Windows that are supported and use /X style paths, perhaps something more complicated needs to be done. r? `@jieyouxu` `@Berrysoft` `@mati865`
2025-05-27Rollup merge of #141552 - jieyouxu:cfg-version-tests, r=est31Michael Goulet-243/+350
Pull out dedicated `cfg_version` syntax test from feature gate test Tracking issue: rust-lang/rust#64796. Closes rust-lang/rust#141452, as a follow-up to https://github.com/rust-lang/rust/pull/141413#discussion_r2104490809 (point 3 of that is probably too pedantic). The feature gate test was dual-purposing causing feature gate errors to distract from syntax exercises. ``@rustbot`` label +F-cfg_version r? ``@est31``
2025-05-27Rollup merge of #141536 - Urgau:ambi_wide_ptr-cmp-diag, r=fee1-deadMichael Goulet-88/+226
Improve `ambiguous_wide_pointer_comparisons` lint compare diagnostics This PR improves the `ambiguous_wide_pointer_comparisons` lint compare diagnostics: `cmp`/`partial_cmp`, but also the operators `<`/`>`/`>=`/`<=`, by: 1. removing the reference to `std::ptr::addr_eq` which only works for equality 2. and adding an `#[expect]` suggestion for keeping the current behavior Fixes rust-lang/rust#141510
2025-05-27Rollup merge of #140591 - Kivooeo:new-fix-five, r=davidtwcoMichael Goulet-55/+124
Fix malformed suggestion for E0061 when method is a macro token in macro context fixes #140512 before ```rust 3 - <Self>::$method(8) 3 + <Self>::<Self>::$method(8, /* u8 */) ``` now ```rust 3 | <Self>::$method(8, /* u8 */) | ++++++++++ ```
2025-05-27Remove out-of-date `noop_*` names.Nicholas Nethercote-23/+5
`mut_visit.rs` has a single function with a `noop_` prefix: `noop_filter_map_expr`. This commit renames as `walk_filter_map_expr` which is consistent with other functions in this file. The commit also removes out-of-date comments that refer to `noop_*` methods.
2025-05-27Use more detailed spans in dyn compat errors within bodiesOli Scherer-206/+205
2025-05-26Auto merge of #140790 - quininer:mac-xray, r=wesleywiser,jieyouxubors-10/+79
Enable xray support for Mac https://github.com/rust-lang/rust/issues/102921 Upstream has supported Mac for a while, let's enable it. I've tested it on M4 and it generates nop sled correctly. * https://maskray.me/blog/2023-06-18-port-llvm-xray-to-apple-systems * https://github.com/llvm/llvm-project/blob/llvmorg-20.1.4/clang/lib/Driver/XRayArgs.cpp#L31 try-job: x86_64-apple-1 try-job: aarch64-apple
2025-05-26Auto merge of #141605 - jieyouxu:rollup-3gjqh5l, r=jieyouxubors-1367/+740
Rollup of 10 pull requests Successful merges: - rust-lang/rust#140898 (minor improvements on running miri) - rust-lang/rust#141392 (Avoid obligation construction dance with query region constraints) - rust-lang/rust#141431 (Emit dummy open drop for unsafe binder) - rust-lang/rust#141433 (Properly analyze captures from unsafe binders) - rust-lang/rust#141439 (Deduplicate dyn compatibility violations due to coercion) - rust-lang/rust#141449 (further deduplicate ast visitor code) - rust-lang/rust#141513 (interpret: add allocation parameters to `AllocBytes`) - rust-lang/rust#141516 (speed up charsearcher for ascii chars) - rust-lang/rust#141526 (add a dedicated section for compiler environment variables in the unstable book) - rust-lang/rust#141550 (Fix `unused_braces` lint suggestion when encountering attributes) r? `@ghost` `@rustbot` modify labels: rollup
2025-05-26bootstrap: translate Windows paths in a way that works for both Cygwin and MSYS2Jeremy Drake-1/+3
Cygwin defaults to rooting Windows paths in /cygdrive/X, while MSYS2 configures them to be /X. Regardless of configuration, drives are always accessible as /proc/cygdrive/X, so use that.
2025-05-27Rollup merge of #141550 - Urgau:unused_braces-attrs, r=chenyukang许杰友 Jieyou Xu (Joe)-16/+68
Fix `unused_braces` lint suggestion when encountering attributes This PR fixes the `unused_braces` lint suggestion when encountering attributes by not removing them in the suggestion. Fixes rust-lang/rust#141549
2025-05-27Rollup merge of #141526 - jyn514:env-vars, r=petrochenkov许杰友 Jieyou Xu (Joe)-2/+18
add a dedicated section for compiler environment variables in the unstable book rendered: ![image](https://github.com/user-attachments/assets/dcb6e2a3-2e2d-43bb-8f45-79715705bf45) fixes https://github.com/rust-lang/rust/issues/141523
2025-05-27Rollup merge of #141516 - bend-n:okay, r=workingjubilee许杰友 Jieyou Xu (Joe)-2/+32
speed up charsearcher for ascii chars attempt at fixing rust-lang/rust#82471 this implementation should be valid because ascii characters are always one byte and there are no continuation bytes that overlap with ascii characters im not completely sure that this is _always_ an improvement but it seems to be an improvement for this case and i dont think it can significantly regress any cases
2025-05-27Rollup merge of #141513 - nia-e:allocbytes-extend, r=RalfJung许杰友 Jieyou Xu (Joe)-34/+81
interpret: add allocation parameters to `AllocBytes` Necessary for a better implementation of [rust-lang/miri#4343](https://github.com/rust-lang/miri/pull/4343). Also included here is the code from that PR, adapted to this new interface for the sake of example and so that CI can run on them; the Miri changes can be reverted and merged separately, though. r? `@RalfJung`
2025-05-27Rollup merge of #141449 - fee1-dead-contrib:push-qkosmtkqztkk, r=oli-obk许杰友 Jieyou Xu (Joe)-430/+285
further deduplicate ast visitor code Previous PR: #141249 Tracking issue: #127615 r? `@oli-obk`
2025-05-27Rollup merge of #141439 - compiler-errors:dyn-compatible-coerce, r=oli-obk许杰友 Jieyou Xu (Joe)-767/+73
Deduplicate dyn compatibility violations due to coercion Don't unnecessarily emit dyn compatibility violations due to coercion to a non-dyn-compatible target type. For us to even have that target type, we would have had to write `dyn Trait` somewhere in source, and that would have led to us *already* emitting a dyn compatibility violation when checking that user written type is WF. r? oli-obk
2025-05-27Rollup merge of #141433 - compiler-errors:unsafe-binder-captures, r=oli-obk许杰友 Jieyou Xu (Joe)-5/+51
Properly analyze captures from unsafe binders We need to represent the unsafe binder unwrap as an adjustment in HIR. Pretty straightforward b/c we already represent it as a projection elem in MIR. Fixes #141418 Fixes #141417 r? oli-obk
2025-05-27Rollup merge of #141431 - compiler-errors:open-drop, r=oli-obk许杰友 Jieyou Xu (Joe)-0/+46
Emit dummy open drop for unsafe binder Fixes rust-lang/rust#141394 We can't taint the body in wfcheck when we have a `T: Copy` bound failure, so we end up binding MIR here. Emit a dummy open drop so that drop elaboration doesn't fail. r? oli-obk
2025-05-27Rollup merge of #141392 - compiler-errors:query-outlives, r=lcnr许杰友 Jieyou Xu (Joe)-108/+73
Avoid obligation construction dance with query region constraints And some renaming...
2025-05-27Rollup merge of #140898 - onur-ozkan:miri-run, r=Kobzol许杰友 Jieyou Xu (Joe)-3/+13
minor improvements on running miri It should be clear from the commit messages when reviewing them one by one.
2025-05-26Auto merge of #141500 - compiler-errors:rerun-cache-2, r=lcnrbors-89/+291
Don't rerun goals if none of their vars have changed r? `@ghost` Alternative to rust-lang/rust#141488. I'm pretty sure that we don't need to re-run the goal at all if the inputs don't change... 🤔
2025-05-26Auto merge of #141442 - compiler-errors:fast-path-pred, r=lcnrbors-8/+59
Fold predicate fast path in canonicalizer and eager resolver See individual commits. r? lcnr
2025-05-26cfg_version: pull out dedicated syntax test from feature gate testJieyou Xu-243/+350
The feature gate test was dual-purposing causing feature gate errors to distract from syntax exercises.
2025-05-26Deduplicate dyn compatibility violations due to coercionMichael Goulet-767/+73
2025-05-26Auto merge of #141406 - RalfJung:less-force-allocate, r=oli-obkbors-142/+138
interpret: do not force_allocate all return places A while ago I cleaned up our `PlaceTy` a little, but as a side-effect of that, return places had to always be force-allocated. That turns out to cause quite a few extra allocations, and for a project we are doing where we marry Miri with a model checker, that means a lot of extra work -- local variables are just so much easier to reason about than allocations. So, this PR brings back the ability to have the return place be just a local of the caller. To make this work cleanly I had to rework stack pop handling a bit, which also changes the output of Miri in some cases as the span for errors occurring during a particular phase of stack pop changed. With these changes, a no-std binary with a function of functions that just take and return scalar types and that uses no pointers now does not move *any* local variables into memory. :) r? `@oli-obk`
2025-05-26Don't rerun goals if none of its vars have changedMichael Goulet-88/+290
2025-05-26RenameMichael Goulet-30/+39
2025-05-26Don't retry in pred_known_to_hold_modulo_regions in new solver, since new ↵Michael Goulet-1/+1
solver is more complete Just a totally unrelated nitpick I'm folding into the PR, since it's code I'd like for us to prune when the new solver lands.
2025-05-26Avoid obligation construction dance with query region constraintsMichael Goulet-96/+52
2025-05-26dist: make sure llvm-project submodule is presentonur-ozkan-0/+8
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-05-26Auto merge of #141567 - jhpratt:rollup-uuhcmci, r=jhprattbors-520/+608
Rollup of 8 pull requests Successful merges: - rust-lang/rust#134696 (Implement `normalize_lexically`) - rust-lang/rust#140539 (Simplify `attribute_groups`) - rust-lang/rust#140863 ([rustdoc] Unify type aliases rendering with other ADT) - rust-lang/rust#140936 (Clarify WTF-8 safety docs) - rust-lang/rust#140952 (Specify that split_ascii_whitespace uses the same definition as is_ascii_whitespace) - rust-lang/rust#141472 (Attempt to improve the `std::fs::create_dir_all` docs related to atomicity) - rust-lang/rust#141502 (ci: move PR job x86_64-gnu-tools to codebuild) - rust-lang/rust#141559 (const-check: stop recommending the use of rustc_allow_const_fn_unstable) r? `@ghost` `@rustbot` modify labels: rollup
2025-05-26Rollup merge of #141559 - RalfJung:less-rustc_allow_const_fn_unstable, ↵Jacob Pratt-247/+41
r=compiler-errors const-check: stop recommending the use of rustc_allow_const_fn_unstable I have seen way too many people see the compiler suggest this attribute and then just apply it without a second thought. This is bad. So let's just stop recommending it; for the rare case where someone needs it, they'll eventually ask us and that way we can be sure that it is truly needed. The dev-guide still also explains `rustc_allow_const_fn_unstable`. Cc ``@rust-lang/wg-const-eval``
2025-05-26Rollup merge of #141502 - marcoieni:x86_64-gnu-tools-codebuild, r=KobzolJacob Pratt-1/+1
ci: move PR job x86_64-gnu-tools to codebuild
2025-05-26Rollup merge of #141472 - fluiderson:dev, r=workingjubileeJacob Pratt-2/+2
Attempt to improve the `std::fs::create_dir_all` docs related to atomicity The original paragraph was added in rust-lang/rust#124520. It doesn't match the actual code logic. It says "function returns an error" if "the parent components" _(which also implies directories)_ "have been created already". The code is as follows: https://github.com/rust-lang/rust/blob/e88e85463468ce5d5ce468414eb69e3b15fa8d42/library/std/src/fs.rs#L3146 https://github.com/rust-lang/rust/blob/e88e85463468ce5d5ce468414eb69e3b15fa8d42/library/std/src/fs.rs#L3160 These lines suppress all errors if any path component is a directory. I've updated the paragraph to mirror this.
2025-05-26Rollup merge of #140952 - SimonSapin:ascii_whitespace_definition, r=dtolnayJacob Pratt-1/+3
Specify that split_ascii_whitespace uses the same definition as is_ascii_whitespace
2025-05-26Rollup merge of #140936 - teor2345:wtf-surrogate-docs, r=workingjubileeJacob Pratt-6/+6
Clarify WTF-8 safety docs This PR is a follow-up to PR #140159, which clarifies ~~two things~~: - the WTF-8 safety comment [was confusing](https://github.com/rust-lang/rust/pull/140159#discussion_r2082766965), either surrogate condition is actually sufficient for safety, both are not required - ~~the private `os_str::Slice` type name is easily confused with `std::slice`~~ ~~Happy to bikeshed the `OsSlice` name, other alternatives are `OsStrSlice` and `StrSlice`. Now it's got a distinct name from `std::slice`, it's easy to search and replace.~~ cc ``@thaliaarchi`` ``@workingjubilee``
2025-05-26Rollup merge of #140863 - GuillaumeGomez:cleanup-tyalias-render, r=lolbinarycatJacob Pratt-214/+376
[rustdoc] Unify type aliases rendering with other ADT Fixes #140739. Better reviewed one commit at a time. Just one thing I'm wondering: should we also render non-`repr` attributes? If so, I wonder if we shouldn't simply change `clean::TypeAlias` to contain the other ADT directly (`Struct`, `Enum` and `Union`) and remove the `TypeAlias::generics` field. Can be done in a follow-up too. cc ``@camelid`` r? ``@notriddle``
2025-05-26Rollup merge of #140539 - nnethercote:simplify-attribute_groups, r=jdonszelmannJacob Pratt-48/+47
Simplify `attribute_groups` It's more complicated than it needs to be. r? ``@jdonszelmann``
2025-05-26Rollup merge of #134696 - ChrisDenton:normalize-lexically, r=workingjubileeJacob Pratt-1/+132
Implement `normalize_lexically` Implements #134694 This is, I think, the most straightforward implementation I could do, which will hopefully more easily allow experimentation if we decide to change the design here.
2025-05-26Auto merge of #138489 - tmiasko:call-tmps-lifetime, r=workingjubileebors-42/+108
Describe lifetime of call argument temporaries passed indirectly Fixes #132014.
2025-05-26extend allocbytes with associated typeNia Espera-34/+81
2025-05-25Auto merge of #141557 - bjorn3:sync_cg_clif-2025-05-25, r=bjorn3bors-265/+1112
Subtree sync for rustc_codegen_cranelift The main highlights this time are a Cranelift update and (thanks for beetrees) f16/f128 support. r? `@ghost` `@rustbot` label +A-codegen +A-cranelift +T-compiler
2025-05-25const-check: stop recommending the use of rustc_allow_const_fn_unstableRalf Jung-247/+41
2025-05-25Do not canonicalize in new solver if it has nothing to canonicalizeMichael Goulet-8/+55
2025-05-25Update tidy exceptionsbjorn3-0/+2
2025-05-25Merge commit '979dcf8e2f213e4f4b645cb62e7fe9f4f2c0c785' into ↵bjorn3-265/+1110
sync_cg_clif-2025-05-25
2025-05-26increase perf of charsearcher for single ascii charactersbendn-2/+32