Files
rust/compiler
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
..
2026-04-20 00:18:28 +08:00
2026-04-20 00:18:28 +08:00
2026-04-20 00:18:28 +08:00
2026-04-20 00:18:28 +08:00
2026-04-15 13:50:43 +02:00
2026-04-20 00:18:28 +08:00
2026-04-16 19:30:56 -04:00
2026-04-20 00:18:28 +08:00
2026-04-20 00:18:28 +08:00
2026-04-20 00:18:28 +08:00
2026-04-20 00:18:28 +08:00
2026-04-20 00:18:28 +08:00
2026-04-20 00:18:28 +08:00
2026-04-20 00:18:28 +08:00
2026-04-20 00:18:28 +08:00
2026-04-20 00:18:28 +08:00
2026-04-08 21:09:07 +02:00
2026-04-20 00:18:28 +08:00
2026-04-20 00:18:28 +08:00
2026-04-20 00:18:28 +08:00