mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-12 16:45:37 +00:00
21 lines
348 B
Rust
21 lines
348 B
Rust
|
//@ 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() {}
|