about summary refs log tree commit diff
path: root/tests/ui/wf/conflicting-impls.rs
blob: 8054eb7c59436f697dc4c18d397d000f24bedff0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//@ edition: 2021

struct Ty;

impl TryFrom<Ty> for u8 {
    type Error = Ty;
    fn try_from(_: Ty) -> Result<Self, Self::Error> {
        loop {}
    }
}

impl TryFrom<Ty> for u8 {
    //~^ ERROR conflicting implementations of trait
    type Error = Ty;
    fn try_from(_: Ty) -> Result<Self, Self::Error> {
        loop {}
    }
}

fn main() {}