]>
Commit | Line | Data |
---|---|---|
85aaf69f | 1 | |
abe05a73 XL |
2 | use std::marker::PhantomData; |
3 | use std::convert::{TryFrom, AsRef}; | |
223e47cc | 4 | |
abe05a73 | 5 | struct Q; |
ff7c6d11 | 6 | impl AsRef<Q> for Box<Q> { //~ ERROR conflicting implementations |
abe05a73 XL |
7 | fn as_ref(&self) -> &Q { |
8 | &**self | |
9 | } | |
ea8adc8c | 10 | } |
abe05a73 XL |
11 | |
12 | struct S; | |
ff7c6d11 | 13 | impl From<S> for S { //~ ERROR conflicting implementations |
abe05a73 XL |
14 | fn from(s: S) -> S { |
15 | s | |
16 | } | |
17 | } | |
18 | ||
19 | struct X; | |
ff7c6d11 | 20 | impl TryFrom<X> for X { //~ ERROR conflicting implementations |
abe05a73 XL |
21 | type Error = (); |
22 | fn try_from(u: X) -> Result<X, ()> { | |
23 | Ok(u) | |
24 | } | |
25 | } | |
26 | ||
ff7c6d11 | 27 | fn main() {} |