rust/tests/ui/ufcs
Matthias Krüger 108b5f462b
Rollup merge of #106752 - sulami:master, r=estebank
Emit a hint for bad call return types due to generic arguments

When the return type of a function call depends on the type of an argument, e.g.

```
fn foo<T>(x: T) -> T {
    x
}
```

and the expected type is set due to either an explicitly typed binding, or because the call to the function is in a tail position without semicolon, the current error implies that the argument in the call has the wrong type.

This new hint highlights that the expected type doesn't match the returned type, which matches the argument type, and that that's why we're flagging the argument type.

Fixes #43608.
2023-01-14 13:04:26 +01:00
..
ufcs-explicit-self-bad.rs
ufcs-explicit-self-bad.stderr
ufcs-partially-resolved.rs
ufcs-partially-resolved.stderr
ufcs-qpath-missing-params.rs
ufcs-qpath-missing-params.stderr
ufcs-qpath-self-mismatch.rs
ufcs-qpath-self-mismatch.stderr