]> git.lizzy.rs Git - rust.git/blob - tests/ui/regions/regions-dependent-autofn.rs
add UI test + docs for `E0789`
[rust.git] / tests / ui / regions / regions-dependent-autofn.rs
1 // run-pass
2 // Test lifetimes are linked properly when we autoslice a vector.
3 // Issue #3148.
4
5 // pretty-expanded FIXME #23616
6
7 fn subslice<F>(v: F) -> F where F: FnOnce() { v }
8
9 fn both<F>(v: F) -> F where F: FnOnce() {
10     subslice(subslice(v))
11 }
12
13 pub fn main() {
14     both(main);
15 }