Matthias Krüger
1c37a23700
Rollup merge of #122195 - jieyouxu:impl-return-note, r=fmease
...
Note that the caller chooses a type for type param
```
error[E0308]: mismatched types
--> $DIR/return-impl-trait.rs:23:5
|
LL | fn other_bounds<T>() -> T
| - -
| | |
| | expected `T` because of return type
| | help: consider using an impl return type: `impl Trait`
| expected this type parameter
...
LL | ()
| ^^ expected type parameter `T`, found `()`
|
= note: expected type parameter `T`
found unit type `()`
= note: the caller chooses the type of T which can be different from ()
```
Tried to see if "expected this type parameter" can be replaced, but that goes all the way to `rustc_infer` so seems not worth the effort and can affect other diagnostics.
Revives #112088 and #104755 .
2024-03-22 20:31:28 +01:00
..
2024-03-21 22:20:40 +01:00
2024-03-22 06:31:51 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-07 17:19:29 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-18 16:25:36 +00:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-16 23:20:42 +00:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-01 13:48:20 +00:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-01 13:48:20 +00:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-18 16:25:36 +00:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-07 17:19:29 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-09 01:13:42 +01:00
2024-03-09 01:13:42 +01:00
2024-03-09 01:13:42 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-01 13:48:20 +00:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-01 13:48:20 +00:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-07 17:19:29 +01:00
2024-03-21 22:20:40 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-07 17:19:29 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00
2024-03-21 22:20:40 +01:00