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 | 1c37a237002abe01727de97b096aad2f947414ce (patch) | |
| tree | c355604774441e67377bc44c1a0be1d25883453c /tests/codegen/patchable-function-entry/patchable-function-entry-both-flags.rs | |
| parent | 879899ca8963e8035172b649169143824a849f5d (diff) | |
| parent | f9a9c4bf3bc8c8675ef12c6f3580aea6a9df667c (diff) | |
| download | rust-1c37a237002abe01727de97b096aad2f947414ce.tar.gz rust-1c37a237002abe01727de97b096aad2f947414ce.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 'tests/codegen/patchable-function-entry/patchable-function-entry-both-flags.rs')
0 files changed, 0 insertions, 0 deletions
