Please lint on a.eq(b.into())
if a.eq(b)
would work
#135201
Labels
A-inference
Area: Type inference
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
In the course of investigating crater breakage, I discovered many instances of a pattern that reduces to this:
This compiles, presumably because
"hello".into()
has only one possible impl that would work. It breaks if anotherFrom
impl is brought into scope. For instance,cargo add bstr
and adduse bstr as _;
to the top of that example, and it breaks.Could we lint against this?
cc @estebank; this is in the same spirit as #129249 .
The text was updated successfully, but these errors were encountered: