mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
13 lines
253 B
Rust
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)
|
|
}
|
|
}
|