mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
20 lines
326 B
Rust
20 lines
326 B
Rust
//@ known-bug: rust-lang/rust#125992
|
|
//@ compile-flags: -Zpolonius=next
|
|
|
|
#![feature(inherent_associated_types)]
|
|
|
|
type Function = for<'a> fn(&'a i32) -> S<'a>::P;
|
|
|
|
struct S<'a>(&'a ());
|
|
|
|
impl<'a> S {
|
|
type P = &'a i32;
|
|
}
|
|
|
|
fn ret_ref_local<'e>() -> &'e i32 {
|
|
let f: Function = |x| x;
|
|
|
|
let local = 0;
|
|
f(&local)
|
|
}
|