mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
24 lines
417 B
Rust
24 lines
417 B
Rust
//@ known-bug: #121127
|
|
//@ compile-flags: -Zpolymorphize=on -Zinline-mir=yes -C debuginfo=2
|
|
// Note that as of PR#123949 this only crashes with debuginfo enabled
|
|
|
|
#![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()
|
|
}
|
|
}
|