From 4e437d636b1cc5af27a9e6488ac9ec5c78c9c096 Mon Sep 17 00:00:00 2001 From: Ariel Ben-Yehuda Date: Tue, 30 Jul 2019 21:16:08 +0300 Subject: [PATCH] fix to bypass #62696 I think that PR is a problem (#63145), but this makes the tests green for now. --- src/librustc/traits/specialize/mod.rs | 2 ++ .../reservation-impls/reservation-impl-coherence-conflict.rs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/librustc/traits/specialize/mod.rs b/src/librustc/traits/specialize/mod.rs index 8a84fca143809..7e3b00f66e98c 100644 --- a/src/librustc/traits/specialize/mod.rs +++ b/src/librustc/traits/specialize/mod.rs @@ -310,6 +310,8 @@ pub(super) fn specialization_graph_provider( }; if let Some(overlap) = overlap { + debug!("found conflicting implementations {:?}", overlap); + let msg = format!("conflicting implementations of trait `{}`{}:{}", overlap.trait_desc, overlap.self_desc.clone().map_or( diff --git a/src/test/ui/traits/reservation-impls/reservation-impl-coherence-conflict.rs b/src/test/ui/traits/reservation-impls/reservation-impl-coherence-conflict.rs index 775278c30cd4c..538a9e8ce035b 100644 --- a/src/test/ui/traits/reservation-impls/reservation-impl-coherence-conflict.rs +++ b/src/test/ui/traits/reservation-impls/reservation-impl-coherence-conflict.rs @@ -4,11 +4,11 @@ #![feature(rustc_attrs)] -trait MyTrait {} +pub trait MyTrait {} #[rustc_reservation_impl="this impl is reserved"] impl MyTrait for () {} -trait OtherTrait {} +pub trait OtherTrait {} impl OtherTrait for () {} impl OtherTrait for T {} //~^ ERROR conflicting implementations