summary refs log tree commit diff
path: root/tests/crashes/121127.rs
blob: e50dc7763fc65e2965342a647b8b96656abbbfb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//@ known-bug: #121127
//@ compile-flags: -Zvalidate-mir -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()
    }
}