rust/tests/ui/wf/conflicting-impls.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
348 B
Rust
Raw Normal View History

2024-04-09 10:19:48 +00:00
//@ 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() {}