rust/tests/crashes/121816.rs
2024-04-14 11:21:51 +02:00

13 lines
253 B
Rust

//@ known-bug: #121816
fn f<'a, T>(_: &'static &'a (), x: &'a T) -> &'static T {
x
}
trait W<'a> {
fn g<T>(self, x: &'a T) -> &'static T;
}
impl<'a> W<'a> for &'static () {
fn g<T>(self, x: &'a T) -> &'static T {
f(&self, x)
}
}