Correctly populate trait impl map when checking for impl overlaps
Also fix an existing compile-fail test which was intended to cover this case. This closes issue #17593
This commit is contained in:
parent
34dfa45718
commit
cab84be812
@ -49,8 +49,8 @@ impl<'cx, 'tcx> OverlapChecker<'cx, 'tcx> {
|
||||
|
||||
// FIXME -- it seems like this method actually pushes
|
||||
// duplicate impls onto the list
|
||||
ty::populate_implementations_for_type_if_necessary(self.tcx,
|
||||
trait_def_id);
|
||||
ty::populate_implementations_for_trait_if_necessary(self.tcx,
|
||||
trait_def_id);
|
||||
|
||||
let mut impls = Vec::new();
|
||||
self.push_impls_of_trait(trait_def_id, &mut impls);
|
||||
|
@ -15,7 +15,9 @@
|
||||
extern crate trait_impl_conflict;
|
||||
use trait_impl_conflict::Foo;
|
||||
|
||||
impl<A> Foo for A { //~ ERROR E0117
|
||||
impl<A> Foo for A {
|
||||
//~^ ERROR E0117
|
||||
//~^^ ERROR E0119
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
Loading…
Reference in New Issue
Block a user