about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-06-06Don't walk into Certainty::Yes subgoals in NestedObligationsForSelfTyMichael Goulet-0/+15
2025-06-05Auto merge of #135054 - cramertj:file-cstr, r=m-ou-sebors-24/+63
Add Location::file_with_nul This is useful for C/C++ APIs which expect the const char* returned from __FILE__ or std::source_location::file_name. ACP: https://github.com/rust-lang/libs-team/issues/466 Tracking issue: https://github.com/rust-lang/rust/issues/141727
2025-06-05Auto merge of #140466 - amandasystems:move-to-preprocessing-step, r=lcnrbors-313/+423
Move placeholder handling to a proper preprocessing step This commit breaks out the logic of placheolder rewriting into its own preprocessing step. It's one of the more boring parts of #130227. The only functional change from this is that the preprocessing step (where extra `r: 'static` constraints are added) is performed upstream of Polonius legacy, finally affecting Polonius. That is mostly a by-product, though. This should be reviewable by anyone in the compiler team, so r? rust-lang/compiler
2025-06-05Auto merge of #142033 - matthiaskrgr:rollup-99lvg0j, r=matthiaskrgrbors-534/+478
Rollup of 11 pull requests Successful merges: - rust-lang/rust#141890 (Add link to correct documentation in htmldocck.py) - rust-lang/rust#141932 (Fix for async drop inside async gen fn) - rust-lang/rust#141960 (Use non-2015 edition paths in tests that do not test for their resolution) - rust-lang/rust#141968 (Run wfcheck in one big loop instead of per module) - rust-lang/rust#141969 (Triagebot: Remove `assign.users_on_vacation`) - rust-lang/rust#141985 (Ensure query keys are printed with reduced queries) - rust-lang/rust#141999 (Visit the ident in `PreciseCapturingNonLifetimeArg`.) - rust-lang/rust#142005 (Change `tag_field` to `FieldIdx` in `Variants::Multiple`) - rust-lang/rust#142017 (Fix incorrect use of "recommend" over "recommended") - rust-lang/rust#142024 (Don't refer to 'this tail expression' in expansion.) - rust-lang/rust#142025 (Don't refer to 'local binding' in extern macro.) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-04Auto merge of #141309 - RalfJung:x86-simd-abi, r=tgross35,nikic,workingjubileebors-51/+34
x86 (32/64): go back to passing SIMD vectors by-ptr Fixes https://github.com/rust-lang/rust/issues/139029 by partially reverting https://github.com/rust-lang/rust/pull/135408 and going back to passing SIMD vectors by-ptr on x86. Sadly, by-val confuses the LLVM inliner so much that it's not worth it... Also fixes https://github.com/rust-lang/rust/issues/141848 by no longer actually using vector registers with the "Rust" ABI. r? `@tgross35` Cc `@nikic` try-job: `test-various*` try-job: dist-i586-gnu-i586-i686-musl try-job: x86_64-gnu-nopt try-job: `x86_64-msvc*` try-job: `i686-msvc*`
2025-06-04Rollup merge of #142025 - m-ou-se:which-local-binding, r=jdonszelmannMatthias Krüger-4/+10
Don't refer to 'local binding' in extern macro. When it comes from a macro expansion, the user has no clue what 'local binding' the compiler is talking about, if they don't know the expansion of the macro. Better to just say 'temporary value'.
2025-06-04Rollup merge of #142024 - m-ou-se:what-tail-expression, r=petrochenkovMatthias Krüger-5/+5
Don't refer to 'this tail expression' in expansion. The user has no clue what the compiler is talking about when it says "this tail expression". It is an implementation detail of the macro that it uses a block with tail expression.
2025-06-04Rollup merge of #142017 - ↵Matthias Krüger-1/+1
Rageking8:fix-incorrect-use-of-recommend-over-recommended, r=lqd Fix incorrect use of "recommend" over "recommended" Spotted this typo in rust-lang/rust#141554, but it has since been merged. r? `@Noratrieb`
2025-06-04Rollup merge of #142005 - scottmcm:fieldidx-in-variantsmultiple, ↵Matthias Krüger-31/+33
r=workingjubilee Change `tag_field` to `FieldIdx` in `Variants::Multiple` It was already available as a generic parameter anyway, and it's not like we'll ever put a tag in the 5-billionth field. This is a first part of pulling smaller pieces out of rust-lang/rust#138759, so r? workingjubilee
2025-06-04Rollup merge of #141999 - nnethercote:precise-ident, r=compiler-errorsMatthias Krüger-2/+3
Visit the ident in `PreciseCapturingNonLifetimeArg`. It's currently skipped, presumably by accident. r? `@BoxyUwU`
2025-06-04Rollup merge of #141985 - compiler-errors:cycle-in-dep-graph-print, r=oli-obkMatthias Krüger-7/+40
Ensure query keys are printed with reduced queries Using `-Z query-dep-graph` and debug assertions leads to an ICE that was originally discovered in rust-lang/rust#141700: > This isn't an incremental bug per se, but instead a bug that has to do with debug printing query keys when debug assertions and `-Z query-dep-graph` is enabled. We end up printing a const (b/c we're using generic const args here) whose debug printing for -Z query-dep-graph requires invoking the same query cyclically 😃 > > I've pushed a commit which should fix this. This isn't related to the standard library changes, but instead b/c it seems to be the first usage of `feature(adt_const_params)` in the standard library that ends up being triggered in incremental tests. r? oli-obk
2025-06-04Rollup merge of #141969 - fmease:triagebot-rm-assign-users-on-vacation, r=KobzolMatthias Krüger-4/+0
Triagebot: Remove `assign.users_on_vacation` It's been superseded by triagebot's [review queue tracking](https://forge.rust-lang.org/triagebot/review-queue-tracking.html), more specifically *rotation mode*. r? Kobzol or triagebot
2025-06-04Rollup merge of #141968 - oli-obk:wfck-everything-at-once, r=wesleywiserMatthias Krüger-68/+63
Run wfcheck in one big loop instead of per module Maybe we can merge this big loop in the future with the `par_hir_body_owners` call below and run typeck only on items that didn't fail wfcheck. For now let's just see if perf likes it, as it by itself should be beneficial to parallel rustc
2025-06-04Rollup merge of #141960 - ferrocene:lw/2015-paths2, r=compiler-errorsMatthias Krüger-290/+290
Use non-2015 edition paths in tests that do not test for their resolution This allows for testing these tests on editions other than 2015 Follow up to https://github.com/rust-lang/rust/pull/141888
2025-06-04Rollup merge of #141932 - azhogin:azhogin/async-drop-inside-asyncgen-fix, ↵Matthias Krüger-8/+31
r=oli-obk Fix for async drop inside async gen fn Return value (for yield) is corrected for async drop inside async gen function. In CFG, when internal async drop future is polled and returned `Poll<()>::Pending`, then async gen resume function returns `Poll<(OptRet)>::Pending`. Fixes rust-lang/rust#140530
2025-06-04Rollup merge of #141890 - Derukugis:master, r=fmeaseMatthias Krüger-114/+2
Add link to correct documentation in htmldocck.py
2025-06-04Auto merge of #142028 - matthiaskrgr:rollup-rawl1zo, r=matthiaskrgrbors-139/+185
Rollup of 7 pull requests Successful merges: - rust-lang/rust#141271 (Streamline some attr parsing APIs) - rust-lang/rust#141570 (Fix incorrect eq_unspanned in TokenStream) - rust-lang/rust#141893 (remove `f16: From<u16>`) - rust-lang/rust#141924 (Lightly tweak docs for BTree{Map,Set}::extract_if) - rust-lang/rust#141939 (exact_div: add tests) - rust-lang/rust#141959 (Add more missing 2015 edition directives) - rust-lang/rust#142007 (Improve some `Visitor` comments.) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-04Add Location::file_with_nulTaylor Cramer-24/+63
This is useful for C/C++ APIs which expect the const char* returned from __FILE__ or std::source_location::file_name.
2025-06-04Rollup merge of #142007 - nnethercote:visitor-comments, r=chenyukangMatthias Krüger-5/+11
Improve some `Visitor` comments. For AST/HIR/THIR visitors, explain the use of deconstruction. r? ``@BoxyUwU``
2025-06-04Rollup merge of #141959 - ferrocene:lw/2015-edition-directives2, ↵Matthias Krüger-46/+74
r=compiler-errors Add more missing 2015 edition directives These tests specifically test 2015 edition behavior, so ensure that they can only be run with this edition
2025-06-04Rollup merge of #141939 - Qelxiros:139911-exact-div-tests, r=workingjubileeMatthias Krüger-0/+62
exact_div: add tests tracking issue: rust-lang/rust#139911 I neglected to add tests in my last PR (rust-lang/rust#141237), so I've added them here. r? ``@workingjubilee`` (Feel free to reroll, I just picked you since you reviewed the last one.)
2025-06-04Rollup merge of #141924 - rs-sac:extr-doc, r=jhprattMatthias Krüger-7/+7
Lightly tweak docs for BTree{Map,Set}::extract_if - Move explanations into comments to match style - Explain the second examples - Make variable names match the data structure Related rust-lang/rust#70530
2025-06-04Rollup merge of #141893 - usamoi:lossless, r=tgross35Matthias Krüger-1/+0
remove `f16: From<u16>` it's not a lossless conversion r? ``@tgross35``
2025-06-04Rollup merge of #141570 - chenyukang:yukang-fix-eq_unspanned, r=workingjubileeMatthias Krüger-16/+12
Fix incorrect eq_unspanned in TokenStream Fixes rust-lang/rust#141522 r? ``@workingjubilee`` should we remove this function? since it's used in several places, i'd prefer to keep it.
2025-06-04Rollup merge of #141271 - nnethercote:attr-streamline, r=jdonszelmannMatthias Krüger-64/+19
Streamline some attr parsing APIs r? ``@jdonszelmann``
2025-06-04Auto merge of #142002 - onur-ozkan:follow-ups2, r=jieyouxubors-26/+26
redesign stage 0 std follow-ups part2 Fixes three bugs: 1. `x check` fails when run on rustdoc without `download-rustc` enabled. (1st commit) 2. `x check` fails when run on the compiler with `download-rustc` enabled. (2nd commit) 3. `x test library` fails with `download-rustc` enabled. (3rd commit) Fixes rust-lang/rust#142018 (case 1) Fixes https://github.com/rust-lang/rust/issues/141983 (case 3)
2025-06-04Don't refer to 'this tail expression' in expansion.Mara Bos-5/+5
The user has no clue what tail expression the compiler is talking about: it is an implementation detail of the macro that it uses a block with tail expression.
2025-06-04Don't refer to 'local binding' in extern macro.Mara Bos-4/+10
The user has no clue what 'local binding' the compiler is talking about, if they don't know the expansion of the macro.
2025-06-04Fix for async drop inside async gen fnAndrew Zhogin-8/+31
2025-06-04Use an enum for SCC representatives, plus other code reviewAmanda Stjerna-136/+131
Co-authored-by: lcnr <rust@lcnr.de>
2025-06-04Add link to correct documentation in htmldocck.pyDerukugi-114/+2
Fix typo in src/etc/htmldocck.py Co-authored-by: León Orell Valerian Liehr <me@fmease.dev> Change documentation link to the correct section in src/etc/htmldocck.py Co-authored-by: León Orell Valerian Liehr <me@fmease.dev> Remove all top-level docs from htmldocck.py
2025-06-04Auto merge of #142003 - matthiaskrgr:rollup-ad8l9ns, r=matthiaskrgrbors-632/+688
Rollup of 8 pull requests Successful merges: - rust-lang/rust#136687 (Improve the documentation of `Display` and `FromStr`, and their interactions) - rust-lang/rust#137306 (Remove `i128` and `u128` from `improper_ctypes_definitions`) - rust-lang/rust#138699 (build dist for x86_64-pc-solaris and sparcv9-sun-solaris) - rust-lang/rust#141250 (add s390x z17 target features) - rust-lang/rust#141467 (make `OsString::new` and `PathBuf::new` unstably const) - rust-lang/rust#141871 (index: add method for checking range on DenseBitSet) - rust-lang/rust#141888 (Use non-2015 edition paths in tests that do not test for their resolution) - rust-lang/rust#142000 (bootstrap: don't symlink source dir into stage0 sysroot) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-04Fix incorrect use of "recommend" over "recommended"Rageking8-1/+1
2025-06-03Change `tag_field` to `FieldIdx` in `Variants::Multiple`Scott McMurray-31/+33
It was already available as a generic parameter anyway, and it's not like we'll ever put a tag in the 5-billionth field.
2025-06-04Improve some `Visitor` comments.Nicholas Nethercote-5/+11
For AST/HIR/THIR visitors, explain the use of deconstruction.
2025-06-04abi_check: tweak some commentsRalf Jung-5/+12
2025-06-04x86 (32/64): go back to passing SIMD vectors by-ptrRalf Jung-46/+22
2025-06-04Rollup merge of #142000 - lambdageek:no-symlink-stage0, r=onur-ozkanMatthias Krüger-13/+17
bootstrap: don't symlink source dir into stage0 sysroot In StdLink::run we subsequently recursively copy the initial sysroot lib directory into the stage0-sysroot lib directory. If the initial sysroot is a toolchain that includes the `rust-src` component (in lib/rustlib/src/rust), if we add this symlink, that recursive copy will overwrite the repo sources with the toolchain's sources. Fixes https://github.com/rust-lang/rust/issues/141991
2025-06-04Rollup merge of #141888 - ferrocene:lw/decouple-tests-from-2015, ↵Matthias Krüger-193/+194
r=compiler-errors Use non-2015 edition paths in tests that do not test for their resolution This allows for testing these tests on editions other than 2015
2025-06-04Rollup merge of #141871 - nia-e:fix-bitset, r=eholkMatthias Krüger-4/+46
index: add method for checking range on DenseBitSet Micro-optimisation that Miri benefits from with the new isolated allocator for native-libs mode. Also possibly just a useful method to have on `DenseBitSet`
2025-06-04Rollup merge of #141467 - cyrgani:const-empty-stringlikes, r=AmanieuMatthias Krüger-5/+7
make `OsString::new` and `PathBuf::new` unstably const Since #129041, `String::into_bytes` is `const`, which allows making `OsString::new` and `PathBuf::new` unstably const now. Not sure what the exact process for this is; does it need an ACP?
2025-06-04Rollup merge of #141250 - folkertdev:s390x-z17-target-features, r=workingjubileeMatthias Krüger-10/+36
add s390x z17 target features tracking issue: https://github.com/rust-lang/rust/issues/130869 earlier target features were added in https://github.com/rust-lang/rust/pull/135630, and https://github.com/rust-lang/rust/issues/135413#issuecomment-2886439455 has some extra context on these new features. r? ``@ghost`` cc ``@uweigand``
2025-06-04Rollup merge of #138699 - psumbera:solaris-ci-build3, r=marcoieniMatthias Krüger-172/+285
build dist for x86_64-pc-solaris and sparcv9-sun-solaris try-job: dist-sparcv9-solaris try-job: dist-x86_64-solaris try-job: dist-various-2 try-job: dist-x86_64-illumos
2025-06-04Rollup merge of #137306 - tgross35:remove-i128-u128-improper-ctypes, ↵Matthias Krüger-235/+75
r=traviscross,workingjubilee Remove `i128` and `u128` from `improper_ctypes_definitions` Rust's 128-bit integers have historically been incompatible with C [1]. However, there have been a number of changes in Rust and LLVM that mean this is no longer the case: * Incorrect alignment of `i128` on x86 [1]: adjusting Rust's alignment proposed at https://github.com/rust-lang/compiler-team/issues/683, implemented at https://github.com/rust-lang/rust/pull/116672. * LLVM version of the above: resolved in LLVM, including ABI fix. Present in LLVM18 (our minimum supported version). * Incorrect alignment of `i128` on 64-bit PowerPC, SPARC, and MIPS [2]: Rust's data layouts adjusted at https://github.com/rust-lang/rust/pull/132422, https://github.com/rust-lang/rust/pull/132741, https://github.com/rust-lang/rust/pull/134115. * LLVM version of the above: done in LLVM 20 https://github.com/llvm/llvm-project/issues/102783. * Incorrect return convention of `i128` on Windows: adjusted to match GCC and Clang at https://github.com/rust-lang/rust/pull/134290. At https://github.com/rust-lang/lang-team/issues/255#issuecomment-2088855084, the lang team considered it acceptable to remove `i128` from `improper_ctypes_definitions` if the LLVM version is known to be compatible. Time has elapsed since then and we have dropped support for LLVM versions that do not have the x86 fixes, meaning a per-llvm-version lint should no longer be necessary. The PowerPC, SPARC, and MIPS changes only came in LLVM 20 but since Rust's datalayouts have also been updated to match, we will be using the correct alignment regardless of LLVM version. `repr(i128)` was added to this lint in https://github.com/rust-lang/rust/pull/138282, but is also removed here. Part of the decision is that `i128` should match `__int128` in C on platforms that provide it, which documentation is updated to indicate. We will not guarantee that `i128` matches `_BitInt(128)` since that can be different from `__int128`. Some platforms (usually 32-bit) do not provide `__int128`; if any ABIs are extended in the future to define it, we will need to make sure that our ABI matches. Closes: https://github.com/rust-lang/rust/issues/134288 [1]: https://github.com/rust-lang/rust/issues/54341 [2]: https://github.com/rust-lang/rust/issues/128950
2025-06-04Rollup merge of #136687 - joshtriplett:improve-display-and-fromstr-docs, ↵Matthias Krüger-0/+28
r=Amanieu Improve the documentation of `Display` and `FromStr`, and their interactions In particular: - `Display` is not necessarily lossless - The output of `Display` might not be parseable by `FromStr`, and might not produce the same value if it is. - Calling `.parse()` on the output of `Display` is usually a mistake unless a type's documented output and input formats match. - The input formats accepted by `FromStr` depend on the type. This documentation adds no API surface area and makes no guarantees about stability. To the best of my knowledge, everything it says is already established to be true. As such, I don't think it needs an FCP.
2025-06-04Auto merge of #141652 - compiler-errors:more-collect-and-apply, r=lqdbors-46/+90
Rework `collect_and_apply` to not rely on size hint for optimization I saw that we have quite a few `collect_and_apply` calls for N=3-7 (N=7 corresponding to cumulative 99% of nalgebra's calls). Didn't perf locally, but also this is super low-pri, so let's see what rust-timer says.
2025-06-04remove outdated RUSTC_SYSROOT handling for ci-rustconur-ozkan-10/+0
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-06-04bootstrap: don't symlink source dir into stage0 sysrootAleksey Kliger-13/+17
In StdLink::run we subsequently recursively copy the initial sysroot lib directory into the stage0-sysroot lib directory. If the initial sysroot is a toolchain that includes the `rust-src` component (in lib/rustlib/src/rust), if we add this symlink, that recursive copy will overwrite the repo sources with the toolchain's sources.
2025-06-04make it possible to request stage 0 std with `Builder::ensure`onur-ozkan-15/+19
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-06-04run `check::Std` as the final steponur-ozkan-1/+7
Signed-off-by: onur-ozkan <work@onurozkan.dev>