about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorLines
2025-08-31Auto merge of #146053 - joboet:split-paths-regression, r=Mark-Simulacrumbors-0/+11
std: fix `SplitPaths` regression Fixes rust-lang/rust#146045 by defining the TAIT more precisely, ensuring that `'a` does not need to be live on drop.
2025-08-31std: fix `SplitPaths` regressionjoboet-0/+11
2025-08-31Rollup merge of #145592 - nilotpal-n7:fix-format-alignment, r=lcnrMatthias Krüger-7/+15
Fix format string grammar in docs and improve alignment error message for #144023 This PR improves error messages and documentation for format strings involving alignment and formatting traits. Highlights: - Clearer error messages for invalid alignment specifiers (e.g., `{0:#X>18}`), showing the expected `<`, `^`, or `>` and a working example: println!("{0:>#18X}", value); - Updated UI test `format-alignment-hash.rs` to reflect the improved error output. - Documentation clarification: ensures examples correctly show how width, alignment, and traits like `x`, `X`, `#` combine. Motivation: Previously, using `#` with alignment and width produced confusing errors. This PR guides users on the correct syntax and provides actionable examples. Testing: - Built the compiler (`./x build`) - Blessed and ran UI tests (`./x. test src/test/ui/fmt/format-alignment-hash.rs --bless`) - Verified full test suite passes (`./x test`) Issue: rust-lang/rust#144023
2025-08-31Rollup merge of #144443 - WaffleLapkin:integer-target-pointer-width, r=NoratriebMatthias Krüger-10/+10
Make target pointer width in target json an integer r? Noratrieb cc `@RalfJung` (https://github.com/rust-lang/rust/pull/142352/files#r2230380120) try-job: x86_64-rust-for-linux
2025-08-31Auto merge of #145582 - estebank:issue-107806, r=chenyukangbors-0/+63
Detect missing `if let` or `let-else` During `let` binding parse error and encountering a block, detect if there is a likely missing `if` or `else`: ``` error: expected one of `.`, `;`, `?`, `else`, or an operator, found `{` --> $DIR/missing-if-let-or-let-else.rs:14:25 | LL | let Some(x) = foo() { | ^ expected one of `.`, `;`, `?`, `else`, or an operator | help: you might have meant to use `if let` | LL | if let Some(x) = foo() { | ++ help: alternatively, you might have meant to use `let else` | LL | let Some(x) = foo() else { | ++++ ``` Fix rust-lang/rust#107806.
2025-08-30Auto merge of #146026 - Zalathar:rollup-urbmv0t, r=Zalatharbors-2/+0
Rollup of 5 pull requests Successful merges: - rust-lang/rust#143462 (fix(lib-std-fs): handle `usize` overflow in `read*`) - rust-lang/rust#144651 (Implementation: `#[feature(nonpoison_condvar)]`) - rust-lang/rust#145465 (Stabilize `array_repeat` feature) - rust-lang/rust#145776 (Optimize `.ilog({2,10})` to `.ilog{2,10}()`) - rust-lang/rust#145969 (Add Duration::from_nanos_u128) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-30Rollup merge of #145465 - Kivooeo:stabilize-array_repeat, r=joboetStuart Cook-2/+0
Stabilize `array_repeat` feature This closes [tracking issue](https://github.com/rust-lang/rust/issues/126695) and stabilises `array::repeat`
2025-08-30Auto merge of #123319 - no92:managarm-target, r=davidtwcobors-4/+14
Add managarm as a tier 3 target This PR aims to introduce the `x86_64-unknown-managarm-mlibc` as a tier 3 target to Rust. [managarm](https://github.com/managarm/managarm) is a microkernel with fully asynchronous I/O that also provides a POSIX server. Despite the differences, managarm provides good compatability with POSIX and Linux APIs. As a rule of thumb, barring OS-specific code, it should be mostly source-compatible with Linux. We have been shipping a patched rust for over 25 releases now, and we would like to upstream our work. For a smoother process, this PR only adds the target to rustc and some documentation. `std` support will be added in a future PR. ## Addressing the tier 3 target policy > A tier 3 target must have a designated developer or developers (the "target maintainers") on record to be CCed when issues arise regarding the target. (The mechanism to track and CC such developers may evolve over time.) `@no92,` `@64` and `@Dennisbonke` will be target maintainers. > Targets must use naming consistent with any existing targets; for instance, a target for the same CPU or OS as an existing Rust target should use the same name for that CPU or OS. Targets should normally use the same names and naming conventions as used elsewhere in the broader ecosystem beyond Rust (such as in other toolchains), unless they have a very good reason to diverge. Changing the name of a target can be highly disruptive, especially once the target reaches a higher tier, so getting the name right is important even for a tier 3 target. > - Target names should not introduce undue confusion or ambiguity unless absolutely necessary to maintain ecosystem compatibility. For example, if the name of the target makes people extremely likely to form incorrect beliefs about what it targets, the name should be changed or augmented to disambiguate it. > - If possible, use only letters, numbers, dashes and underscores for the name. Periods (.) are known to cause issues in Cargo. `x86_64-unknown-managarm-mlibc` is what we use for LLVM as well. > Tier 3 targets may have unusual requirements to build or use, but must not create legal issues or impose onerous legal terms for the Rust project or for Rust developers or users. > - The target must not introduce license incompatibilities. > - Anything added to the Rust repository must be under the standard Rust license (MIT OR Apache-2.0). > - The target must not cause the Rust tools or libraries built for any other host (even when supporting cross-compilation to the target) to depend on any new dependency less permissive than the Rust licensing policy. This applies whether the dependency is a Rust crate that would require adding new license exceptions (as specified by the tidy tool in the rust-lang/rust repository), or whether the dependency is a native library or binary. In other words, the introduction of the target must not cause a user installing or running a version of Rust or the Rust tools to be subject to any new license requirements. > - Compiling, linking, and emitting functional binaries, libraries, or other code for the target (whether hosted on the target itself or cross-compiling from another target) must not depend on proprietary (non-FOSS) libraries. Host tools built for the target itself may depend on the ordinary runtime libraries supplied by the platform and commonly used by other applications built for the target, but those libraries must not be required for code generation for the target; cross-compilation to the target must not require such libraries at all. For instance, rustc built for the target may depend on a common proprietary C runtime library or console output library, but must not depend on a proprietary code generation library or code optimization library. Rust's license permits such combinations, but the Rust project has no interest in maintaining such combinations within the scope of Rust itself, even at tier 3. > - "onerous" here is an intentionally subjective term. At a minimum, "onerous" legal/licensing terms include but are not limited to: non-disclosure requirements, non-compete requirements, contributor license agreements (CLAs) or equivalent, "non-commercial"/"research-only"/etc terms, requirements conditional on the employer or employment of any particular Rust developers, revocable terms, any requirements that create liability for the Rust project or its developers or users, or any requirements that adversely affect the livelihood or prospects of the Rust project or its developers or users. [managarm](https://github.com/managarm/managarm) is licensed as MIT. No dependencies were added. > Neither this policy nor any decisions made regarding targets shall create any binding agreement or estoppel by any party. If any member of an approving Rust team serves as one of the maintainers of a target, or has any legal or employment requirement (explicit or implicit) that might affect their decisions regarding a target, they must recuse themselves from any approval decisions regarding the target's tier status, though they may otherwise participate in discussions. > - This requirement does not prevent part or all of this policy from being cited in an explicit contract or work agreement (e.g. to implement or maintain support for a target). This requirement exists to ensure that a developer or team responsible for reviewing and approving a target does not face any legal threats or obligations that would prevent them from freely exercising their judgment in such approval, even if such judgment involves subjective matters or goes beyond the letter of these requirements. Understood. None of the listed maintainers are on a Rust team. > Tier 3 targets should attempt to implement as much of the standard libraries as possible and appropriate (core for most targets, alloc for targets that can support dynamic memory allocation, std for targets with an operating system or equivalent layer of system-provided functionality), but may leave some code unimplemented (either unavailable or stubbed out as appropriate), whether because the target makes it impossible to implement or challenging to implement. The authors of pull requests are not obligated to avoid calling any portions of the standard library on the basis of a tier 3 target not implementing those portions. Support for `std` will be provided in a future PR. Only minor changes are required, however they depend on support in the `libc` crate which will be PRed in soon. > The target must provide documentation for the Rust community explaining how to build for the target, using cross-compilation if possible. If the target supports running binaries, or running tests (even if they do not pass), the documentation must explain how to run such binaries or tests for the target, using emulation if possible or dedicated hardware if necessary. The steps needed to take are described in the documentation provided with this PR. > Tier 3 targets must not impose burden on the authors of pull requests, or other developers in the community, to maintain the target. In particular, do not post comments (automated or manual) on a PR that derail or suggest a block on the PR based on a tier 3 target. Do not send automated messages or notifications (via any medium, including via `@)` to a PR author or others involved with a PR regarding a tier 3 target, unless they have opted into such messages. > - Backlinks such as those generated by the issue/PR tracker when linking to an issue or PR are not considered a violation of this policy, within reason. However, such messages (even on a separate repository) must not generate notifications to anyone involved with a PR who has not requested such notifications. Understood. > Patches adding or updating tier 3 targets must not break any existing tier 2 or tier 1 target, and must not knowingly break another tier 3 target without approval of either the compiler team or the maintainers of the other tier 3 target. > - In particular, this may come up when working on closely related targets, such as variations of the same architecture with different features. Avoid introducing unconditional uses of features that another variation of the target may not have; use conditional compilation or runtime detection, as appropriate, to let each target run code supported by that target. We have no indication that anything breaks due to this PR. > Tier 3 targets must be able to produce assembly using at least one of rustc's supported backends from any host target. No problems here, as we target `x86_64`. r? compiler-team
2025-08-29Rollup merge of #145967 - Enselic:big-enum-debuginfo-span, r=wesleywiserTrevor Gross-4/+14
compiler: Include span of too huge enum with `-Cdebuginfo=2` We have the ui test `tests/ui/limits/huge-enum.rs` to ensure we emit an error if we encounter too big enums. Before this fix, compiling the test with `-Cdebuginfo=2` would not include the span of the instantiation site, because the error is then emitted from a different code path that does not include the span. Propagate the span to the error also in the debuginfo case, so the test passes regardless of debuginfo level. I'm sure we can propagate spans in more places, but let's start small. ## Test failure without the fix Here is what the failure looks like if you run the test without the fix: ``` [ui] tests/ui/limits/huge-enum.rs#full-debuginfo ... F . failures: ---- [ui] tests/ui/limits/huge-enum.rs#full-debuginfo stdout ---- Saved the actual stderr to `/home/martin/src/rust/build/x86_64-unknown-linux-gnu/test/ui/limits/huge-enum.full-debuginfo/huge-enum.full-debuginfo.stderr` diff of stderr: 1 error: values of the type `Option<TYPE>` are too big for the target architecture - --> $DIR/huge-enum.rs:17:9 - | - LL | let big: BIG = None; - | ^^^ 6 7 error: aborting due to 1 previous error 8 The actual stderr differed from the expected stderr To update references, rerun the tests and pass the `--bless` flag To only update this specific test, also pass `--test-args limits/huge-enum.rs` ``` as can be seen, the `span` used to be missing with `debuginfo=2`. ## See also This is one small step towards resolving rust-lang/rust#61117. cc https://github.com/rust-lang/rust/pull/144499 which began running UI tests with `rust.debuginfo-level-tests=1`. This PR is part of preparing for increasing that to debuglevel 2.
2025-08-29Rollup merge of #145467 - Kivooeo:stabilize-strict_provenance_atomic_ptr, ↵Trevor Gross-1/+0
r=scottmcm Stabilize `strict_provenance_atomic_ptr` feature This closes [tracking issue](https://github.com/rust-lang/rust/issues/99108) and stabilises `AtomicPtr::{fetch_ptr_add, fetch_ptr_sub, fetch_byte_add, fetch_byte_sub, fetch_or, fetch_and, fetch_xor}` --- EDIT: FCP completed at https://github.com/rust-lang/rust/issues/99108#issuecomment-3168260347
2025-08-29Rollup merge of #145676 - Oneirical:uncountable-integer-9, r=jieyouxuMatthias Krüger-37/+41
Rehome 30 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` [#2 of Batch #2] Part of rust-lang/rust#133895 Methodology: 1. Refer to the previously written `tests/ui/SUMMARY.md` 2. Find an appropriate category for the test, using the original issue thread and the test contents. 3. Add the issue URL at the bottom (not at the top, as that would mess up stderr line numbers) 4. Rename the tests to make their purpose clearer Inspired by the methodology that `@Kivooeo` was using. r? `@jieyouxu`
2025-08-29Rollup merge of #145675 - Oneirical:uncountable-integer-8, r=jieyouxuMatthias Krüger-80/+66
Rehome 30 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` [#1 of Batch #2] Part of rust-lang/rust#133895 Methodology: 1. Refer to the previously written `tests/ui/SUMMARY.md` 2. Find an appropriate category for the test, using the original issue thread and the test contents. 3. Add the issue URL at the bottom (not at the top, as that would mess up stderr line numbers) 4. Rename the tests to make their purpose clearer Inspired by the methodology that `@Kivooeo` was using. r? `@jieyouxu`
2025-08-29Auto merge of #145978 - Zalathar:rollup-0dzk72g, r=Zalatharbors-0/+25
Rollup of 9 pull requests Successful merges: - rust-lang/rust#143713 (Add a mailmap entry for gnzlbg) - rust-lang/rust#144275 (implement Sum and Product for Saturating(u*)) - rust-lang/rust#144354 (fix(std): Fix undefined reference to __my_thread_exit on QNX 8.0) - rust-lang/rust#145387 (Remove TmpLayout in layout_of_enum) - rust-lang/rust#145793 (std library: use execinfo library also on NetBSD.) - rust-lang/rust#145884 (Test `instrument-mcount` codegen) - rust-lang/rust#145947 (Add more to the `[workspace.dependencies]` section in the top-level `Cargo.toml`) - rust-lang/rust#145972 (fix `core::marker::Destruct` doc) - rust-lang/rust#145977 (tests: Ignore basic-stepping.rs on riscv64) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-29Rollup merge of #145977 - CaiWeiran:basic-stepping-test, r=jieyouxuStuart Cook-0/+1
tests: Ignore basic-stepping.rs on riscv64 Same as [PR 145745](https://github.com/rust-lang/rust/pull/145745) r? `@lqd`
2025-08-29tests: Ignore basic-stepping.rs on riscv64Caiweiran-0/+1
2025-08-29Rollup merge of #145884 - clubby789:test-mcount, r=Mark-SimulacrumStuart Cook-0/+24
Test `instrument-mcount` codegen Closes rust-lang/rust#92109 by testing that a call to `mcount` is actually emitted
2025-08-29Auto merge of #145377 - ChayimFriedman2:solver-def-id, r=lcnrbors-1/+1
Switch next solver to use a specific associated type for trait def id The compiler just puts `DefId` in there, but rust-analyzer uses different types for each kind of item. See [the Zulip discussion](https://rust-lang.zulipchat.com/#narrow/channel/185405-t-compiler.2Frust-analyzer/topic/Implmentating.20New.20Trait.20Solver/near/534329794). In short, it will be a tremendous help to r-a to use specific associated types, while for the solver and the compiler it's a small change. So I ported `TraitId`, as a proof of concept and it's also likely the most impactful. r? types
2025-08-29compiler: Add `{x86_64,aarch64,riscv64gc}-unknown-managarm-mlibc` targetsno92-4/+14
Co-authored-by: Dennis Bonke <dennis@managarm.org>
2025-08-28Auto merge of #145970 - GuillaumeGomez:rollup-pr11qds, r=GuillaumeGomezbors-41/+186
Rollup of 6 pull requests Successful merges: - rust-lang/rust#142472 (Add new `doc(attribute = "...")` attribute) - rust-lang/rust#145368 (CFI: Make `lto` and `linker-plugin-lto` work the same for `compiler_builtins`) - rust-lang/rust#145853 (Improve error messages around invalid literals in attribute arguments) - rust-lang/rust#145920 (bootstrap: Explicitly mark the end of a failed test's captured output) - rust-lang/rust#145937 (add doc-hidden to exports in attribute prelude) - rust-lang/rust#145965 (Move exporting of profiler and sanitizer symbols to the LLVM backend) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-28Rollup merge of #145853 - JonathanBrouwer:fix-lit-parsing, r=jdonszelmannGuillaume Gomez-36/+12
Improve error messages around invalid literals in attribute arguments r? `@jdonszelmann` This previously created two errors, which is a bit ugly and the second one didn't add any value Blocked on https://github.com/rust-lang/rust/pull/143193
2025-08-28Rollup merge of #145368 - rcvalle:rust-cfi-fix-142284, r=dianqkGuillaume Gomez-0/+22
CFI: Make `lto` and `linker-plugin-lto` work the same for `compiler_builtins` Fix rust-lang/rust#142284 by ensuring that `#![no_builtins]` crates can still emit bitcode when proper (i.e., non-rustc) LTO (i.e., -Clinker-plugin-lto) is used.
2025-08-28Rollup merge of #142472 - GuillaumeGomez:doc-attribute-attribute, r=fmeaseGuillaume Gomez-5/+152
Add new `doc(attribute = "...")` attribute Fixes rust-lang/rust#141123. The implementation and purpose of this new `#[doc(attribute = "...")]` attribute is very close to `#[doc(keyword = "...")]`. Which means that luckily for us, most of the code needed was already in place and `@Noratrieb` nicely wrote a first draft that helped me implement this new attribute very fast. Now with all this said, there is one thing I didn't do yet: adding a `rustdoc-js-std` test. I added GUI tests with search results for attributes so should be fine but I still plan on adding one for it once documentation for builtin attributes will be written into the core/std libs. You can test it [here](https://rustdoc.crud.net/imperio/doc-attribute-attribute/foo/index.html). cc `@Noratrieb` `@Veykril`
2025-08-28compiler: Include span of too huge enum with -Cdebuginfo=2Martin Nordholts-4/+14
We have a ui test to ensure we emit an error if we encounter too big enums. Before this fix, compiling the test with `-Cdebuginfo=2` would not include the span of the instantiation site, because the error is then emitted from a different code path that does not include the span. Propagate the span to the error also in the debuginfo case, so the test passes regardless of debuginfo level.
2025-08-28Update uitest stderrJonathan Brouwer-50/+4
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-08-28Add another case to the bad-lit-suffixes testJonathan Brouwer-1/+23
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-08-28Auto merge of #145807 - zachs18:only-consider-auto-traits-empty, ↵bors-0/+161
r=compiler-errors When determining if a trait has no entries for the purposes of omitting vptrs from subtrait vtables, consider its transitive supertraits' entries, instead of just its own entries. When determining if a non-first supertrait vptr can be omitted from a subtrait vtable, check if the supertrait or any of its (transitive) supertraits have methods, instead of only checking if the supertrait itself has methods. This fixes the soundness issue where a vptr would be omitted for a supertrait with no methods but that itself had a supertrait with methods, while still optimizing the case where the supertrait is "truly" empty (it has no own vtable entries, and none of its (transitive) supertraits have any own vtable entries). Fixes <https://github.com/rust-lang/rust/issues/145752> ----- Old description: ~~Treat all non-auto traits as non-empty (possibly having methods) for purposes of determining if we need to emit a vptr for a non-direct supertrait (and for new "sibling" entries after a direct or non-direct supertrait).~~ This fixes (I believe) the soundness issue, ~~but regresses vtable sizes and possibly upcasting perf in some cases when using trait hierarchies with empty non-auto traits (see `tests/ui/traits/vtable/multiple-markers.stderr`) since we use vptrs in some cases where we could re-use the vtable.~~ Fixes <https://github.com/rust-lang/rust/issues/145752> Re-opens (not anymore) <https://github.com/rust-lang/rust/issues/114942> Should not affect <https://github.com/rust-lang/rust/issues/131813> (i.e. the soundness issue is still fixed, ~~though the relevant vtables in the `trait Evil` example will be larger now~~) cc implementation history <https://github.com/rust-lang/rust/pull/131864> <https://github.com/rust-lang/rust/pull/113856> ----- ~~It should be possible to check if a trait has any methods from itself *or* supertraits (instead of just from itself), but to fix the immediate soundness issue, just assume any non-auto trait could have methods. A more optimistic check can be implemented later (or if someone does it soon it could just supercede this PR :smile:).~~ Done in latest push `@rustbot` label A-dyn-trait F-trait_upcasting
2025-08-28Add ui test for unsupported `doc(attribute = "...")` case for attributes ↵Guillaume Gomez-0/+17
with namespace
2025-08-28Add tests for `doc(attribute = "...")` attributeGuillaume Gomez-5/+135
2025-08-28Rollup merge of #145941 - Urgau:int_to_ptr_transmutes-unsized, r=lcnrStuart Cook-0/+50
Disable `integer_to_ptr_transmutes` suggestion for unsized types This PR disables the machine-applicable `integer_to_ptr_transmutes` lint suggestion for unsized types, as [`std::ptr::with_exposed_provenance`](https://doc.rust-lang.org/std/ptr/fn.with_exposed_provenance.html) requires sized types. We should probably mention [`std::ptr::from_raw_parts`](https://doc.rust-lang.org/std/ptr/fn.from_raw_parts.html) when it becomes stable. Related to https://github.com/rust-lang/rust/issues/145935
2025-08-28Rollup merge of #145928 - Darksonn:file_as_c_str, r=joshtriplettStuart Cook-3/+3
Rename `Location::file_with_nul` to `file_as_c_str` This renames the method to be consistent with the ongoing T-libs-api FCP found at https://github.com/rust-lang/rust/issues/141727#issuecomment-3228016708. I did not rename the unstable feature as we are going to be stabilizing it soon anyway. This will probably break RfL, so it will require an updated commit hash for the Linux Kernel that I will add here soon. r? `@Amanieu`
2025-08-28Rollup merge of #144864 - Muscraft:no-source-fixes, r=jieyouxuStuart Cook-19/+63
No source fixes This PR started as a fix for a rendering bug that [got noticed in #143661](https://github.com/rust-lang/rust/pull/143661#discussion_r2199109530), but turned into a fix for any rendering bugs related to files with no source. - Don't add an end column separator after a file with no source - Add column separator before secondary messages with no source - Render continuation between no source labels Before ``` error[E0423]: expected function, tuple struct or tuple variant, found struct `std::collections::HashMap` ╭▸ $DIR/multi-suggestion.rs:17:13 │ LL │ let _ = std::collections::HashMap(); │ ━━━━━━━━━━━━━━━━━━━━━━━━━━━ ╭▸ $SRC_DIR/std/src/collections/hash/map.rs:LL:COL │ ╰ note: `std::collections::HashMap` defined here ╰╴ note: constructor is not visible here due to private fields ╭▸ $SRC_DIR/alloc/src/boxed.rs:LL:COL │ ╰ note: private field │ ╰ note: private field ``` After ``` error[E0423]: expected function, tuple struct or tuple variant, found struct `std::collections::HashMap` ╭▸ $DIR/multi-suggestion.rs:17:13 │ LL │ let _ = std::collections::HashMap(); │ ━━━━━━━━━━━━━━━━━━━━━━━━━━━ ╰╴ ╭▸ $SRC_DIR/std/src/collections/hash/map.rs:LL:COL │ ╰ note: `std::collections::HashMap` defined here note: constructor is not visible here due to private fields ╭▸ $SRC_DIR/alloc/src/boxed.rs:LL:COL │ ├ note: private field │ ╰ note: private field ``` Note: This PR also makes it so `rustc` and `annotate-snippets` match in these cases
2025-08-28Rollup merge of #143193 - JonathanBrouwer:link_rework, r=jdonszelmannStuart Cook-365/+942
Port `#[link]` to the new attribute parsing infrastructure Ports `link` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197
2025-08-28Auto merge of #145949 - jhpratt:rollup-smzd7tr, r=jhprattbors-0/+143
Rollup of 5 pull requests Successful merges: - rust-lang/rust#145382 (Add assembly test for `-Zreg-struct-return` option) - rust-lang/rust#145746 (Fix STD build failing for target_os = "espidf") - rust-lang/rust#145826 (Use AcceptContext in AttribueParser::check_target) - rust-lang/rust#145894 (Ensure the coordinator thread terminates before its channels drop) - rust-lang/rust#145946 (Remove unnecessary `[dependencies.unicode-properties]` entries.) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-27Rollup merge of #145382 - winstonallo:reg-struct-return-asm-test, r=tgross35Jacob Pratt-0/+143
Add assembly test for `-Zreg-struct-return` option r? `@tgross35` As discussed in rust-lang/rust#145309 with `@tgross35` and `@ojeda,` I added assembly tests for the `-Zreg-struct-return` option verifying that it changes the ABI from hidden pointer to register-return on x86_32. The test covers: - Direct struct construction, showing register return vs hidden pointer - External function calls returning structs, showing ABI mismatch handling Different memory layouts affect ABI mismatch handling, but register returns use the same register allocation regardless of struct field layout (apart from the fact that they use smaller registers for smaller structs, of course). [Here](https://godbolt.org/z/dcW6rnMG3) is a compiler explorer with 2 examples. Let me know if there is anything more I could add. Since register returns only happen for structs up to the size of 2 registers, I figured testing the pivot value (8 bytes) would be most critical.
2025-08-28Auto merge of #145877 - nikic:capture-address, r=tmiaskobors-17/+32
Use captures(address) instead of captures(none) for indirect args While provenance cannot be captured through these arguments, the address / object identity can. Fixes https://github.com/rust-lang/rust/issues/137668. r? `@ghost`
2025-08-27fix target-pointer-width in testsWaffle Lapkin-2/+2
2025-08-27turn pointer width into an integer in target.jsonWaffle Lapkin-8/+8
2025-08-27Add test batch 2Oneirical-37/+41
2025-08-27Disable `int_to_ptr_transmutes` suggestion for unsized typesUrgau-0/+50
2025-08-27Changes to the uitestsJonathan Brouwer-365/+942
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-08-27Add assembly tests verifying the functionality of `-Zreg-struct-return` for ↵winstonallo-0/+143
structs of different sizes. This test covers: * The callee side, making sure that the structs are correctly loaded into registers when `-Zreg-struct-return` is enabled * The caller side, making sure that callers do receive returned structs in registers when `-Zreg-struct-return` is enabled Structs of the size of up to 2 registers (8 bytes) can be returned in registers in x86_32. Therefore, the tests are done with 3 different struct sizes: * 2 bytes (register returns should happen) * 8 bytes (last value where register returns should happen) * 12 bytes (register returns should not happen even when `-Zreg-struct-return` is enabled)
2025-08-27Fix format string grammar in docs and improve alignment error messageNilotpal Gupta-7/+15
2025-08-27Rename `Location::file_with_nul` to `file_as_c_str`Alice Ryhl-3/+3
2025-08-27Auto merge of #145923 - matthiaskrgr:rollup-rkejtos, r=matthiaskrgrbors-4/+21
Rollup of 6 pull requests Successful merges: - rust-lang/rust#144274 (add Option::reduce) - rust-lang/rust#145562 (Simplify macro generating ToString implementations for `&…&str`) - rust-lang/rust#145625 (improve float to_degrees/to_radians rounding comments and impl) - rust-lang/rust#145740 (Introduce a `[workspace.dependencies`] section in the top-level `Cargo.toml`) - rust-lang/rust#145885 (Inherit TCC in debuginfo tests on macOS) - rust-lang/rust#145905 (Stop calling unwrap when format foreign has trailing dollar) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-27Rollup merge of #145905 - TaKO8Ki:fix-137580, r=nnethercoteMatthias Krüger-4/+21
Stop calling unwrap when format foreign has trailing dollar Fixes rust-lang/rust#137580
2025-08-27Auto merge of #140737 - amandasystems:revised-constraint-search, r=lcnrbors-28/+25
Region inference: Use outlives-static constraints in constraint search Revise the extra `r: 'static` constraints added upon universe issues to add an explanation, and use that explanation during constraint blame search. This greatly simplifies the region inference logic, which now does not need to reverse-engineer the event that caused a region to outlive `'static`. This cosmetically changes the output of two UI tests. I blessed them i separate commits with separate motivations, but that can of course be squashed as desired. We probably want that. The PR was extracted out of rust-lang/rust#130227 and consists of one-third of its functional payload. r? lcnr
2025-08-27Rollup merge of #142215 - saethlin:mir-building-tests, r=cjgillotMatthias Krüger-47/+69
Use -Zmir-opt-level=0 in tests for MIR building The mir-opt test suite currently defaults all tests in it to `-Zmir-opt-level=4`, so if a test is trying to test MIR _building_ not optimizations and it is in that directory, it _must_ override the default mir-opt-level.
2025-08-27remove old crash testTakayuki Maeda-6/+3
2025-08-27Add test batch 1Oneirical-80/+66
2025-08-26Use -Zmir-opt-level=0 in tests for MIR buildingBen Kimock-47/+69