Conversation
new label: `cannot call trait method as a free function`
|
(rust-highfive has picked a reviewer for you, use r? to override) |
|
Hi @obeis, thanks for the PR. Can you explain the approach you took here a bit more? Specifically:
Please also provide a UI test or a few demonstrating your changes. |
This comment has been minimized.
This comment has been minimized.
The message is a bit confusing in this context. The problem here is not that we can't call If we are going to suggest this message, we may need to restrict it to function signatures that do not contain the ambiguous inference variable in either its inputs or outputs. |
|
Hi @compiler-errors, thanks for taking time to review this.
|
…ession like `<_ as Trait>::method()`
label: `cannot call trait method as a free function`
|
@rustbot ready |
|
☔ The latest upstream changes (presumably #99462) made this pull request unmergeable. Please resolve the merge conflicts. |
| | | ||
| LL | let bar = <Impl as Into<T>>::into(foo_impl) * 1u32; | ||
| | ++++++++++++++++++++++++ ~ | ||
| | ^^^^ cannot call trait method as a free function |
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Closes #98938