Fix misdetection of upstream intercrate ambiguity.
This commit is contained in:
parent
4d503b0c74
commit
099bb1ba8a
3 changed files with 15 additions and 10 deletions
|
|
@ -19,7 +19,7 @@ struct Cake<X>(X);
|
|||
impl<T:Sugar> Cake<T> { fn dummy(&self) { } }
|
||||
//~^ ERROR E0592
|
||||
//~| NOTE duplicate definitions for `dummy`
|
||||
//~| NOTE upstream crates may add new impl of trait `Sugar` for type `std::boxed::Box<_>`
|
||||
//~| NOTE downstream crates may implement trait `Sugar` for type `std::boxed::Box<_>`
|
||||
impl<U:Sugar> Cake<Box<U>> { fn dummy(&self) { } }
|
||||
//~^ NOTE other definition for `dummy`
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,6 @@ impl<T:Sugar> Sweet for T { }
|
|||
impl<U:Sugar> Sweet for Box<U> { }
|
||||
//~^ ERROR E0119
|
||||
//~| NOTE conflicting implementation for `std::boxed::Box<_>`
|
||||
//~| NOTE upstream crates may add new impl of trait `Sugar` for type `std::boxed::Box<_>`
|
||||
//~| NOTE downstream crates may implement trait `Sugar` for type `std::boxed::Box<_>`
|
||||
|
||||
fn main() { }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue