about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorLines
2025-05-15Auto merge of #141050 - matthiaskrgr:rollup-uyzqbmj, r=matthiaskrgrbors-20/+346
Rollup of 7 pull requests Successful merges: - #139749 (docs(library/core/src/pin): fix typo "necessarily" -> "necessary") - #140685 (Simplify `Vec::as_non_null` implementation and make it `const`) - #140712 (normalization: avoid incompletely constraining GAT args) - #140768 (Improve `dangerous_implicit_aurorefs` diagnostic output) - #140947 (Flush errors before deep normalize in `dropck_outlives`) - #140990 (VxWorks: updates from recent libc versions) - #141027 (remove `RustfmtState` to reduce `initial_rustfmt` complexity) r? `@ghost` `@rustbot` modify labels: rollup
2025-05-15Rollup merge of #140947 - compiler-errors:pending-norm, r=lcnrMatthias Krüger-0/+107
Flush errors before deep normalize in `dropck_outlives` Deep normalization doesn't allow the ocx to have pending obligations, so process them before deeply normalizing. Fixes https://github.com/rust-lang/rust/issues/140931 Fixes https://github.com/rust-lang/rust/issues/140462
2025-05-15Rollup merge of #140768 - Urgau:improv_autorefs-lint, r=fmeaseMatthias Krüger-19/+201
Improve `dangerous_implicit_aurorefs` diagnostic output This PR *greatly* improves the `dangerous_implicit_aurorefs` lint diagnostic output. Kind of related to #140721. r? ```@jieyouxu``` (maybe)
2025-05-15Rollup merge of #140712 - lcnr:normalization-gat-args, r=compiler-errorsMatthias Krüger-1/+38
normalization: avoid incompletely constraining GAT args We need to copy the behavior of #125214 in the new solver. This fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/202 which seems to be the cause of the regression in `deptypes`. r? ```@compiler-errors```
2025-05-15Auto merge of #136264 - GuillaumeGomez:optimize-integers-to-string, r=Amanieubors-6/+6
Optimize `ToString` implementation for integers Part of https://github.com/rust-lang/rust/issues/135543. Follow-up of https://github.com/rust-lang/rust/pull/133247 and https://github.com/rust-lang/rust/pull/128204. The benchmark results are: | name| 1.87.0-nightly (3ea711f17 2025-03-09) | With this PR | diff | |-|-|-|-| | bench_i16 | 32.06 ns/iter (+/- 0.12) | 17.62 ns/iter (+/- 0.03) | -45% | | bench_i32 | 31.61 ns/iter (+/- 0.04) | 15.10 ns/iter (+/- 0.06) | -52% | | bench_i64 | 31.71 ns/iter (+/- 0.07) | 15.02 ns/iter (+/- 0.20) | -52% | | bench_i8 | 13.21 ns/iter (+/- 0.14) | 14.93 ns/iter (+/- 0.16) | +13% | | bench_u16 | 31.20 ns/iter (+/- 0.06) | 16.14 ns/iter (+/- 0.11) | -48% | | bench_u32 | 33.27 ns/iter (+/- 0.05) | 16.18 ns/iter (+/- 0.10) | -51% | | bench_u64 | 31.44 ns/iter (+/- 0.06) | 16.62 ns/iter (+/- 0.21) | -47% | | bench_u8 | 10.57 ns/iter (+/- 0.30) | 13.00 ns/iter (+/- 0.43) | +22% | More information about it in [the original comment](https://github.com/rust-lang/rust/pull/136264#discussion_r1987542954). r? `@workingjubilee`
2025-05-15Auto merge of #136988 - compiler-errors:impossible_predicates, r=lcnrbors-0/+38
Use the new solver in the `impossible_predicates` The old solver is unsound for many reasons. One of which was weaponized by `@lcnr` in #140212, where the old solver was incompletely considering a dyn vtable method to be impossible and replacing its vtable entry with a null value. This null function could be called post-mono. The new solver is expected to be less incomplete due to its correct handling of higher-ranked aliases in relate. This PR switches the `impossible_predicates` query to use the new solver, which patches this UB. r? lcnr
2025-05-14Use more subdiagnostics and reword the overloaded deref noteUrgau-24/+4
2025-05-14Improve `dangerous_implicit_aurorefs` diagnostic outputUrgau-19/+221
2025-05-14Rollup merge of #140989 - xizheyin:issue-139631, r=compiler-errorsMatthias Krüger-0/+58
Suggest replace f with f: Box<f> when expr field is short hand Fixes #139631 r? compiler
2025-05-14Rollup merge of #140827 - compiler-errors:gather-locals-twice, r=oli-obkMatthias Krüger-0/+27
Do not ICE when reassigning in GatherLocalsVisitor on the bad path Fixes https://github.com/rust-lang/rust/issues/140785 Fixes https://github.com/rust-lang/rust/issues/140730 See comment in code. r? oli-obk
2025-05-14Suggest replace `f` with `f: Box<f>` when expr field is short handxizheyin-2/+2
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-05-14Add ui test suggest-box-for-expr-field-issue-139631xizheyin-0/+58
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-05-13Auto merge of #140927 - mejrs:test5, r=jieyouxubors-34/+35
chore: move more ui tests r? `@jieyouxu`
2025-05-12Flush errors before deep normalize in dropck_outlivesMichael Goulet-0/+107
2025-05-12Move more tests/ui testsmejrs-34/+35
2025-05-12ui/async-drop-initial: factor in panic strategy in destructor size checkJorge Aparicio-1/+4
the size of `AsyncStruct`'s destructor depends on whether the configured panic strategy is 'unwind' or 'abort' so factor that into the test using conditional compilation fixes rust-lang/rust#140939
2025-05-12Auto merge of #140925 - the8472:test-140207, r=compiler-errorsbors-0/+13
add regression test for 140207 Assembly test for #140207
2025-05-11Auto merge of #140842 - tmiasko:print-mono-items, r=saethlinbors-67/+59
Remove mono item collection strategy override from -Zprint-mono-items Previously `-Zprint-mono-items` would override the mono item collection strategy. When debugging one doesn't want to change the behaviour, so this was counter productive. Additionally, the produced behaviour was artificial and might never arise without using the option in the first place (`-Zprint-mono-items=eager` without `-Clink-dead-code`). Finally, the option was incorrectly marked as `UNTRACKED`. Resolve those issues, by turning `-Zprint-mono-items` into a boolean flag that prints results of mono item collection without changing the behaviour of mono item collection. For codegen-units test incorporate `-Zprint-mono-items` flag directly into compiletest tool. Test changes are mechanical. `-Zprint-mono-items=lazy` was removed without additional changes, and `-Zprint-mono-items=eager` was turned into `-Clink-dead-code`. Linking dead code disables internalization, so tests have been updated accordingly.
2025-05-11Auto merge of #140915 - matthiaskrgr:rollup-lxce4zr, r=matthiaskrgrbors-2/+464
Rollup of 3 pull requests Successful merges: - #140397 (Add T-compiler backports Zulip notifications) - #140851 (Warn when `#[export_name]` is used with generic functions) - #140862 (Enable non-leaf Frame Pointers for Arm64EC Windows) r? `@ghost` `@rustbot` modify labels: rollup
2025-05-11add regression test for 140207The 8472-0/+13
2025-05-11Auto merge of #140902 - azhogin:azhogin/async-drop-open-drop-for-adt-fix, ↵bors-0/+21
r=oli-obk Async drop fix for async_drop_in_place<T> layout for unspecified T Fix for https://github.com/rust-lang/rust/issues/140423. Layout of `async_drop_in_place<T>::{closure}` is calculated for unspecified T from dataflow_const_prop `try_make_constant`. `@oli-obk,` do you think, it may be a better solution to add check like `if !args[0].is_fully_specialized() { return None; }` in `fn async_drop_coroutine_layout`? And could you, pls, recommend, how to implement `is_fully_specialized()` in a most simple way?
2025-05-11Rollup merge of #140862 - dpaoliello:arm64ecfp, r=wesleywiserMatthias Krüger-2/+4
Enable non-leaf Frame Pointers for Arm64EC Windows This was enabled for native Arm64 via #140828 r? `@workingjubilee`
2025-05-11Rollup merge of #140851 - mu001999-contrib:new-lint, r=bjorn3Matthias Krüger-0/+460
Warn when `#[export_name]` is used with generic functions Fixes #140742
2025-05-11Auto merge of #135015 - heiher:stabilize-loongarch-target-features, r=Amanieubors-6/+2
Partially stabilize LoongArch target features Stabilization PR for the LoongArch target features. This PR stabilizes some of the target features tracked by #44839. Specifically, this PR stabilizes the following target features: * f * d * frecipe * lasx * lbt * lsx * lvz Docs PR: https://github.com/rust-lang/reference/pull/1707 r? `@Amanieu`
2025-05-11Rollup merge of #140865 - Kivooeo:9th, r=NoratriebLeón Orell Valerian Liehr-4/+4
Make t letter looks like lowercase rather than uppercase randomly noticed that, took opportunity to fix :D it was looks like "RusT" now fixed to "Rust" r? `@jieyouxu` before <img src="https://github.com/user-attachments/assets/1ff19891-2e7b-4633-897d-2b2635aff9c6" width="65%" /> now <img src="https://github.com/user-attachments/assets/d577a2af-6755-411b-8050-2556f0f12e75" width="65%" />
2025-05-11Rollup merge of #140795 - mu001999-contrib:sugg-stable-import-first, ↵León Orell Valerian Liehr-0/+23
r=petrochenkov Prefer to suggest stable candidates rather than unstable ones Fixes #140240 The logic is to replace unstable suggestions if we meet a new stable one, and do nothing if any other situation. In old logic, we just use the first candidate we meet as the suggestion for the same items. E.g., `std::range::legacy::Range` vs `std::ops::Range`, `legacy` in the former is unstable, we prefer to suggest use the latter.
2025-05-11Async drop fix for async_drop_in_place<T> layout calculated for unspecified TAndrew Zhogin-0/+21
2025-05-10Auto merge of #140895 - matthiaskrgr:rollup-rfvqv4t, r=matthiaskrgrbors-47/+46
Rollup of 7 pull requests Successful merges: - #129334 (Implement (part of) ACP 429: add `DerefMut` to `Lazy[Cell/Lock]`) - #139562 (rustdoc: add a handle that makes sidebar resizing more obvious) - #140151 (remove intrinsics::drop_in_place) - #140660 (remove 'unordered' atomic intrinsics) - #140783 (Update documentation of OnceLock::get_or_init.) - #140789 (Update hermit-abi to 0.5.1) - #140879 (1.87.0 release notes: remove nonsensical `~` operator) r? `@ghost` `@rustbot` modify labels: rollup
2025-05-10Rollup merge of #140151 - RalfJung:drop_in_place-is-not-an-intrinsic, ↵Matthias Krüger-32/+31
r=Mark-Simulacrum remove intrinsics::drop_in_place This was only ever accidentally stable, and has been marked as deprecated since Rust 1.52, released almost 4 years ago. We've removed the old serialization `derive`s, maybe we can remove this one as well? As suggested by ``@jhpratt,`` let's see what crater says for this one.
2025-05-10Rollup merge of #139562 - notriddle:notriddle/ew-resize, r=GuillaumeGomezMatthias Krüger-15/+15
rustdoc: add a handle that makes sidebar resizing more obvious This aims to make the resizable sidebars more obvious Preview: <https://notriddle.com/rustdoc-html-demo-12/sidebar-resize-handle/std/index.html> ![image](https://github.com/user-attachments/assets/d4d70982-8045-4fed-818a-982108b0d3b3) ![image](https://github.com/user-attachments/assets/4aaa3663-19f3-4e04-89c6-53db0ddb72ed) ![image](https://github.com/user-attachments/assets/3f612c5b-6be1-4383-801a-067c87425eb9) This change is based on some discussion on [lolbinarycat's idea], but with a more "traditional" design. Specifically, while very few systems use exactly this design, most of them use [a skeumorph](https://ux.stackexchange.com/questions/80463/what-do-the-3-close-horizontal-bars-not-hamburger-menu-represent-and-what-is-t/80591#80591) of a grip texture: - This design is similar to the one used in the Rust Playground, and almost identical to UX StackExchange: <details><img src="https://github.com/user-attachments/assets/39a6bb69-4895-4fd0-87da-b87913bc7309"></details> <details><img src="https://github.com/user-attachments/assets/a41942e1-651b-410b-b855-2aafe8fe54f4"></details> - In Jira, resizable sidebars have a stack of four dots, but only in one row. <details><img src="https://github.com/user-attachments/assets/13047998-02bf-47e6-b796-16f393f870b0"></details> - In The GIMP, resizable sidebars have a stack of three dots. <details><img src="https://github.com/user-attachments/assets/138f5c21-3069-4bbe-b306-0bb9a4bf0318"></details> - In [old Windows], "panes" are defined to have the same border style as a window, which has a raised appearance. To evoke this, the PR adds a lightweight "shadow" border, darker than the sidebar itself <details><img src="https://github.com/user-attachments/assets/301da4b8-6c48-4131-b741-1689af84670a"></details> - In [NeXT], a drag point usually had an innie, whether the line in a slider or the circle in a scroller; I can also hide and show the favorites bar in Workspace by dragging on a circular "grip spot" <details><img src="https://github.com/user-attachments/assets/b13c2d30-a3a8-4672-90fa-58c1fdf19f42"></details> - In [old Mac], drag handles for things usually had a "grip track" of parallel lines. <details><img src="https://github.com/user-attachments/assets/1fbecc67-ffbc-4ed6-a8c5-a9ff085638db"></details> *This design is far closer to old Mac than anything else*, though they've put it in the bottom corner instead of the middle. - [OSX] kept that, but the "Source List" part of the Finder still had the circle grip for a time the same way Workspace did (resulting in an odd mishmash, if you compare the source list sidebar with the other grip tracks embedded in the scrollbars). <details><img src="https://github.com/user-attachments/assets/551b8f9d-2dd8-4291-917f-dc88741a2b97"></details> [lolbinarycat's idea]: https://github.com/rust-lang/rust/pull/139420 [old Windows]: https://archive.org/details/windowsinterface00micr/page/n9/mode/2up [old Mac]: https://archive.org/details/apple-hig/1996_Human_Interface_Guidelines_for_Mac_OS_8_%28WWDC_Release%29/page/16/mode/2up [NeXT]: https://archive.org/details/apple-hig/1993%20NeXTSTEP%20User%20Interface%20Guidelines%20-%20Release%203/page/145/mode/2up [OSX]: https://dn721903.ca.archive.org/0/items/apple-hig/MacOSX_HIG_2005_09_08.pdf#page=267
2025-05-10Auto merge of #140854 - oli-obk:merge-queries, r=nnethercotebors-119/+119
Merge typeck loop with static/const item eval loop r? `@ghost` Let's try a small one first. Doing this in general has some bad cache coherence issues because the query caches are laid out in `Vec<QueryResult>` lists per query where each index refers to a `DefId` in the same order as we're iterating. Iterating two or more lists at the same time does have cache issues, so I want to poke a bit at it to see if we can't merge just a few of them at a time.
2025-05-10Warn when #[export_name] is used with generic functionsMu001999-0/+460
2025-05-09Rollup merge of #140848 - kornelski:not-a-dead-end, r=compiler-errorsMatthias Krüger-26/+26
Improved error message for top-level or-patterns I was confused by "top-level or-patterns are not allowed in `let` bindings" error, because it sounded like or-patterns were completely unsupported. This error has an auto-fix suggestion that shows otherwise, but the auto-fix isn't always visible in IDEs. I've changed the wording to be consistent with "`Fn` bounds require arguments in parentheses", and it doesn't sound like a dead-end any more.
2025-05-09Rollup merge of #140843 - jieyouxu:broken-pipe, r=KobzolMatthias Krüger-3/+5
Fix `broken-pipe-no-ice` run-make test for rpath-less builds The `broken-pipe-no-ice` run-make test currently fails on rpath-less builds, because host compiler runtime libs are not configured for raw std command usages. This PR is an alternative approach to #140744. However, instead of duplicating `run_make_support::util::set_host_compiler_dylib_path` logic, we instead support "ejecting" the "configured" underlying std `Command` from `bare_rustc()` and `rustdoc()`, where host compiler runtime libs are already set. cc `@jchecahi` r? `@Kobzol`
2025-05-09Rollup merge of #140819 - reddevilmidzy:add-test, r=petrochenkovMatthias Krüger-0/+53
Add regression test for 125877 close: #125877 https://github.com/rust-lang/rust/issues/125877#issuecomment-2143704586 has been resolved https://github.com/rust-lang/rust/pull/128171
2025-05-09Rollup merge of #139863 - fmease:simp-doctest-build-arg-passing, ↵Matthias Krüger-8/+8
r=GuillaumeGomez rustdoc: Replace unstable flag `--doctest-compilation-args` with a simpler one: `--doctest-build-arg` Tracking issue: https://github.com/rust-lang/rust/issues/134172. Context: https://github.com/rust-lang/rust/pull/137096#issuecomment-2776318800 Yeets the ad hoc shell-like lexer for 'nested' program arguments. No FCP necessary since the flag is unstable. I've chosen to replace `compilation` with `build` because it's shorter (you now need to pass it multiple times in order to pass many arguments to the doctest compiler, so it matters a bit) and since I prefer it esthetically. **Issue**: Even though we don't process the argument passed to `--doctest-build-arg`, we end up passing it via an argument file (`rustc `@argfile`)` which delimits arguments by line break (LF or CRLF, [via](https://doc.rust-lang.org/rustc/command-line-arguments.html#path-load-command-line-flags-from-a-path)) meaning ultimately the arguments still get split which is unfortunate. Still, I think this change is an improvement over the status quo. I'll update the tracking issue if/once this PR merges. I'll also add the (CR)LF issue to 'unresolved question'. r? GuillaumeGomez r? notriddle
2025-05-09rustdoc: add a handle that makes sidebar resizing more obviousMichael Howell-15/+15
This change is based on some discussion on [lolbinarycat's idea], but with a more "traditional" design. Specifically, this is the closest thing I could find to a consensus across many systems I looked at for inspiration: - In Jira, resizable sidebars have a stack of four dots. - In The GIMP, resizable sidebars have a stack of three dots. - In [old Windows], "panes" are defined to have the same border style as a window, which has a raised appearance. - In [NeXT], a drag point usually had an innie, whether the line in a slider or the circle in a scroller; I can also hide and show the favorites bar in Workspace by dragging on a circular "grip spot" - In [old Mac], drag handles for things usually had a "grip track" of parallel lines. - [OSX] kept that, but the "Source List" part of the Finder still had the circle grip for a time the same way Workspace did [lolbinarycat's idea]: https://github.com/rust-lang/rust/pull/139420 [old Windows]: https://archive.org/details/windowsinterface00micr/page/n9/mode/2up [old Mac]: https://archive.org/details/apple-hig/1996_Human_Interface_Guidelines_for_Mac_OS_8_%28WWDC_Release%29/page/16/mode/2up [NeXT]: https://archive.org/details/apple-hig/1993%20NeXTSTEP%20User%20Interface%20Guidelines%20-%20Release%203/page/145/mode/2up [OSX]: https://dn721903.ca.archive.org/0/items/apple-hig/MacOSX_HIG_2005_09_08.pdf#page=267
2025-05-09Enable non-leaf Frame Pointers for Arm64EC WindowsDaniel Paoliello-2/+4
2025-05-09make t looks like lowercaseKivooeo-4/+4
2025-05-09Merge typeck loop with static/const item eval loopOli Scherer-119/+119
2025-05-09Do not ICE when reassigning in GatherLocalsVisitor on the bad pathMichael Goulet-0/+27
2025-05-09Suggest stable candidates rather than unstable onesmu001999-0/+23
2025-05-09Error message for top-level or-patterns suggesting a solutionKornel-26/+26
2025-05-09Auto merge of #140839 - pietroalbini:pa-version-bump, r=pietroalbinibors-27/+0
Bump version number to 1.89.0 Part of the release process. This PR must not be rolled up. Closes #129461. r? `@ghost`
2025-05-09tests: fix `broken-pipe-no-ice` to use `bare_rustc`/`rustc`Jieyou Xu-3/+5
Where host compiler runtime libs are properly configured, instead of raw `RUSTC`/`RUSTDOC` commands. Co-authored-by: Jesus Checa Hidalgo <jchecahi@redhat.com>
2025-05-09Remove mono item collection strategy override from -Zprint-mono-itemsTomasz Miąsko-67/+59
Previously `-Zprint-mono-items` would override the mono item collection strategy. When debugging one doesn't want to change the behaviour, so this was counter productive. Additionally, the produced behaviour was artificial and might never arise without using the option in the first place (`-Zprint-mono-items=eager` without `-Clink-dead-code`). Finally, the option was incorrectly marked as `UNTRACKED`. Resolve those issues, by turning `-Zprint-mono-items` into a boolean flag that prints results of mono item collection without changing the behaviour of mono item collection. For codegen-units test incorporate `-Zprint-mono-items` flag directly into compiletest tool. Test changes are mechanical. `-Zprint-mono-items=lazy` was removed without additional changes, and `-Zprint-mono-items=eager` was turned into `-Clink-dead-code`. Linking dead code disables internalization, so tests have been updated accordingly.
2025-05-09Disarm `time` bomb (diagnostics)Jieyou Xu-27/+0
Revert "Rollup merge of #129343 - estebank:time-version, r=jieyouxu" This reverts commit 26f75a65d70773e4520634b9f6599ddf08c499e6, reversing changes made to 2572e0e8c9d5d671eccb1d5791e55c929c4720f4. Imports are modified to fix merge conflicts and remove unused ones.
2025-05-09Rollup merge of #140804 - bend-n:signed, r=lcnrStuart Cook-14/+58
add signed ints to unn- transmutes to ensure feature parity i forgot a few cases https://github.com/rust-lang/rust-clippy/pull/14703/#pullrequestreview-2824194994 adds - char -> i32 - i32 -> char - float -> size () - size -> float - i32 -> float ``@rustbot`` label L-unnecessary_transmutes
2025-05-09Rollup merge of #140801 - xizheyin:issue-140747, r=SparrowLiiStuart Cook-0/+34
Use span before macro expansion in lint for-loops-over-falibles Fixes #140747 I think there are going to be a lot of cases where macros are expanded in the compiler resulting in span offsets, and I'd like to know how that's typically handled. Does it have to be handled specially every time?
2025-05-09Update target feature testsWANG Rui-6/+2