You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use std::iter::IntoIterator;traitFoo{fnfoo(&self);}traitBar{fnbar(&self);}impl<I>FooforIwhereI:IntoIterator,I::Item:Bar{fnfoo(&self){}}implFooforVec<u8>{fnfoo(&self){}}fnmain(){}
fails with
<anon>:11:1: 16:2 error: conflicting implementations for trait `Foo` [E0119]
<anon>:11 impl<I> Foo for I
<anon>:12 where I: IntoIterator,
<anon>:13 I::Item: Bar {
<anon>:14 fn foo(&self) {
<anon>:15 }
<anon>:16 }
<anon>:18:1: 21:2 note: note conflicting implementation here
<anon>:18 impl Foo for Vec<u8> {
<anon>:19 fn foo(&self) {
<anon>:20 }
<anon>:21 }
still occur this error inrustc 1.11.0 (9b21dcd6a 2016-08-15)
error message is conflicting implementations of trait 'Foo' for type 'std::vec::Vec<u8>'
sanxiyn
changed the title
Can't provide non-overlpping trait impls based on assoc type trait bound
Can't provide non-overlapping trait impls based on assoc type trait bound
Sep 30, 2016
fails with
See playpen.
Since
u8
does not implementBar
, the impl-s are actually non-overlapping.Possibly related to #20400.
The text was updated successfully, but these errors were encountered: