about summary refs log tree commit diff
path: root/tests/ui/regions/regions-dependent-autofn.rs
blob: c58ae5e24ee3e18eb10070aca7ec93eb28d3f51a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//@ run-pass
// Test lifetimes are linked properly when we autoslice a vector.
// Issue #3148.


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);
}