rust/tests
Jonathan Brouwer 7ee6257470
Rollup merge of #151035 - issue-150693-closure-arg-suggestion, r=jieyouxu
Don't suggest replacing closure parameter with type name

When a closure has an inferred parameter type like `|ch|` and the expected type differs in borrowing (e.g., `char` vs `&char`), the suggestion would incorrectly propose `|char|` instead of something valid like `|ch: char|`.

This happened because the code couldn't walk explicit `&` references in the HIR when the type is inferred, and fell back to replacing the entire parameter span with the expected type name.

Fix by only emitting the suggestion when we can properly identify the `&` syntax to remove.

Fixes rust-lang/rust#150693
2026-01-13 09:01:35 +01:00
..
assembly-llvm Rollup merge of #150826 - s390x-asm-f16-vector, r=uweigand,tgross35 2026-01-13 09:01:29 +01:00
auxiliary Rollup merge of #150368 - minicore-ordering, r=workingjubilee 2026-01-11 09:56:38 +01:00
codegen-llvm Relax test expectation for @__llvm_profile_runtime_user 2026-01-12 11:03:07 +01:00
codegen-units address review comments; fix CI 2026-01-01 19:17:11 -05:00
coverage Create place and value indices on-demand. 2025-12-14 16:33:24 +00:00
coverage-run-rustdoc
crashes Bless other tests 2026-01-07 09:33:40 +08:00
debuginfo tests/debuginfo/macro-stepping.rs: Add revisions default-mir-passes, no-SingleUseConsts-mir-pass 2025-12-23 15:33:56 +01:00
incremental Bless other tests 2026-01-07 09:33:40 +08:00
mir-opt Auto merge of #150748 - nnethercote:canonicalizer-cleanups, r=lcnr 2026-01-11 22:58:38 +00:00
pretty Recursive delegation improvements 2025-12-25 14:49:01 +03:00
run-make Rollup merge of #150151 - destabilise-target-spec-json, r=Kivooeo 2026-01-13 09:01:29 +01:00
run-make-cargo tests/run-make-cargo/same-crate-name-and-macro-name: New regression test 2025-12-17 11:21:27 +01:00
rustdoc-gui Rollup merge of #150816 - method-anchor, r=camelid 2026-01-09 12:00:01 +01:00
rustdoc-html Rollup merge of #150561 - semiopaque, r=BoxyUwU 2026-01-09 11:59:59 +01:00
rustdoc-js Auto merge of #149370 - Zalathar:rollup-6fkk5x4, r=Zalathar 2025-11-27 07:30:25 +00:00
rustdoc-js-std std: Use more unix.rs code on WASI targets 2025-12-08 06:46:28 -08:00
rustdoc-json Add tests for doc(attribute = "...") attribute 2025-08-28 15:56:30 +02:00
rustdoc-ui Rollup merge of #150934 - move-doc-attr-checks, r=JonathanBrouwer 2026-01-13 09:01:31 +01:00
ui Rollup merge of #151035 - issue-150693-closure-arg-suggestion, r=jieyouxu 2026-01-13 09:01:35 +01:00
ui-fulldeps lexer/parser: ensure deps use the same unicode version 2025-12-27 11:20:42 +01:00
COMPILER_TESTS.md