]> git.lizzy.rs Git - rust.git/commit
Auto merge of #66561 - TimoFreiberg:trait-name-report, r=estebank
authorbors <bors@rust-lang.org>
Tue, 26 Nov 2019 05:07:02 +0000 (05:07 +0000)
committerbors <bors@rust-lang.org>
Tue, 26 Nov 2019 05:07:02 +0000 (05:07 +0000)
commit0f6f66fcdc4abf110171ee06b1a72bdd2883b74f
treee36f93d606f1cd8d914a723c68d9c8b6ab73e6b6
parent2626f3d3d5c3007745176aa0fe22781b9ec2bb06
parent2a0292f9aa96e32ca44ec7dc599c668fd735dbe8
Auto merge of #66561 - TimoFreiberg:trait-name-report, r=estebank

Add version mismatch help message for unimplemented trait

Improves issue #22750

The error reporting for E0277 (the trait `X` is not implemented for `Foo`)
now checks whether `Foo` implements a trait with the same path as `X`,
which probably means that the programmer wanted to actually use only one
version of the trait `X` instead of the two.

Still open:
* the same diagnostic should be added for [the trait method case](https://github.com/rust-lang/rust/issues/22750#issuecomment-372077056)
* Showing the real crate versions would be nice, but rustc currently doesn't have that information [according to Esteban](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/diagnostics.20for.20crate.20version.20mismatch/near/180572989)