mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
16 lines
286 B
Rust
16 lines
286 B
Rust
//@ run-pass
|
|
// Test lifetimes are linked properly when we autoslice a vector.
|
|
// Issue #3148.
|
|
|
|
//@ pretty-expanded FIXME #23616
|
|
|
|
fn subslice<F>(v: F) -> F where F: FnOnce() { v }
|
|
|
|
fn both<F>(v: F) -> F where F: FnOnce() {
|
|
subslice(subslice(v))
|
|
}
|
|
|
|
pub fn main() {
|
|
both(main);
|
|
}
|