diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/regions/regions-dependent-autofn.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/regions/regions-dependent-autofn.rs b/src/test/ui/regions/regions-dependent-autofn.rs new file mode 100644 index 000000000..246dbb556 --- /dev/null +++ b/src/test/ui/regions/regions-dependent-autofn.rs @@ -0,0 +1,15 @@ +// 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); +} |