rust/tests/crashes/121127.rs
2024-04-18 06:13:47 +02:00

23 lines
332 B
Rust

//@ known-bug: #121127
//@ compile-flags: -Zpolymorphize=on -Zinline-mir=yes
#![feature(specialization)]
pub trait Foo {
fn abc() -> u32;
}
pub trait Marker {}
impl<T> Foo for T {
default fn abc(f: fn(&T), t: &T) -> u32 {
16
}
}
impl<T: Marker> Foo for T {
fn def() -> u32 {
Self::abc()
}
}