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 Move /src/test to /tests 2023-01-11 09:32:08 +00:00
ufcs-explicit-self-bad.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
ufcs-partially-resolved.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
ufcs-partially-resolved.stderr When suggesting writing a fully qualified path probe for appropriate types 2023-01-11 21:30:10 +00:00
ufcs-qpath-missing-params.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
ufcs-qpath-missing-params.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
ufcs-qpath-self-mismatch.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
ufcs-qpath-self-mismatch.stderr Emit a hint for bad call return types due to generic arguments 2023-01-13 13:34:55 +09:00