Closed
Description
When calling (x: Type)::into()
in a fn that expects Into<Type>
we currently emit:
error[E0283]: type annotations needed
--> src/librustc_resolve/late/diagnostics.rs:1143:21
|
1143 | err.span_note(spans.into(), "these named lifetimes are available to use");
| ^^^^^^^^^ ------------ this method call resolves to `T`
| |
| cannot infer type for type parameter `S` declared on the method `span_note`
|
= note: cannot resolve `_: std::convert::Into<rustc_span::MultiSpan>`
We should check whether T == MultiSpan
and suggest the removal of the into()
call.
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsArea: Suggestions generated by the compiler applied by `cargo fix`Category: An issue proposing an enhancement or a PR with one.Diagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint; hard to understand for new users.Diagnostics: An error or lint that needs small tweaks.Low priorityRelevant to the compiler team, which will review and decide on the PR/issue.