diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-03-22 20:31:28 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-22 20:31:28 +0100 |
| commit | aa184c558f9705dbe4bcf875e2218e01b250b850 (patch) | |
| tree | 4357e001731224713c2a5b74bc731a6488cd6cc2 /compiler/rustc_codegen_llvm/src | |
| parent | 104c4bc808721ecd2560a7c7de63c4db16c6f6d1 (diff) | |
| parent | cacdf92d379485b4eb0e219f06785d41a9ec53af (diff) | |
| download | rust-aa184c558f9705dbe4bcf875e2218e01b250b850.tar.gz rust-aa184c558f9705dbe4bcf875e2218e01b250b850.zip | |
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.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
