rust/tests/crashes/121127.rs

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

24 lines
414 B
Rust
Raw Normal View History

2024-04-16 23:01:07 +00:00
//@ known-bug: #121127
//@ compile-flags: -Zvalidate-mir -Zinline-mir=yes -C debuginfo=2
2024-04-18 16:42:26 +00:00
// Note that as of PR#123949 this only crashes with debuginfo enabled
2024-04-16 23:01:07 +00:00
#![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()
}
}