Files
rust/tests/ui/closures
Jonathan Brouwer cb4bb14237 Rollup merge of #155877 - qaijuang:fix-155727-fnmut-diagnostic, r=wesleywiser
Avoid misleading return-type note for foreign `Fn` callees

Fixes rust-lang/rust#155727.

The issue occurred because the code that emitted the `Fn`/`FnMut` suggestion only avoided the return-type fallback when it could point at a local callee argument. The local case from rust-lang/rust#125325 was fixed in rust-lang/rust#126226, but nested cross-crate cases could still suggest changing the enclosing function's return type even though the relevant `Fn` requirement came from the callee argument.

This is also the broader diagnostic shape discussed in rust-lang/rust#119985.

This PR checks the instantiated callee predicates for an exact `Fn` bound
on the closure argument, and extends `wrong-closure-arg-suggestion-125325` with cross-crate function and method cases for that path.
2026-04-29 23:51:40 +02:00
..
2025-11-27 14:13:58 -05:00
2025-06-30 11:50:19 +05:00
2025-08-05 19:34:46 +05:00
2025-07-01 16:26:57 +05:00
2023-06-20 19:46:01 -04:00
2025-08-27 00:23:26 -04:00
2025-07-31 21:25:49 +05:00
2025-07-31 21:25:49 +05:00
2024-04-21 15:43:43 -03:00
2024-04-21 15:43:43 -03:00
2024-04-21 15:43:43 -03:00
2025-11-27 14:13:58 -05:00
2025-11-27 14:13:58 -05:00
2023-08-28 17:47:37 -03:00
2024-04-21 15:43:43 -03:00
2024-04-21 15:43:43 -03:00
2023-10-20 21:14:01 +00:00
2025-08-22 13:16:44 +08:00
2025-08-22 13:16:44 +08:00
2025-04-09 10:42:26 +00:00
2025-12-02 18:25:13 +00:00
2025-11-27 14:13:58 -05:00
2024-12-13 00:04:56 +00:00
2024-12-13 00:04:56 +00:00
2025-07-01 15:29:29 +05:00
2025-12-16 02:10:08 +09:00
2026-01-31 14:01:54 +01:00
2026-01-31 14:01:54 +01:00
2025-08-09 16:27:20 +05:00