Files
rust/tests/ui/impl-trait
Jonathan Brouwer 5abe5ea630 Rollup merge of #155546 - Unique-Usman:ua/impl_traits, r=estebank
Improve E0308 error message for `impl Trait` return mismatches

When a function returns `impl Trait`, all branches must return the same concrete type. Previously, the compiler showed:

    expected `First` because of return type

This was misleading, as it suggested the return type was `First`, rather than any single type implementing the trait.

Update the diagnostic to:

    expected a single type implementing `Value` because of return type

Also highlight the first return expression to make it clearer why subsequent returns do not match.
2026-04-21 20:42:50 +02:00
..
2025-05-09 02:35:18 +00:00
2026-03-28 16:18:11 +09:00
2025-11-27 11:19:00 -05:00
2025-06-30 11:50:19 +05:00
2026-03-23 12:09:34 +01:00
2026-03-23 12:09:34 +01:00
2025-08-20 11:10:38 +02:00
2025-11-27 14:13:58 -05:00
2025-11-27 14:13:58 -05:00