Open
Description
In the course of investigating crater breakage, I discovered many instances of a pattern that reduces to this:
fn main() {
let s = String::from("hello");
assert!(s.eq("hello".into()));
}
This compiles, presumably because "hello".into()
has only one possible impl that would work. It breaks if another From
impl is brought into scope. For instance, cargo add bstr
and add use bstr as _;
to the top of that example, and it breaks.
Could we lint against this?