diff options
Diffstat (limited to 'tests/ui/regions/regions-link-fn-args.rs')
-rw-r--r-- | tests/ui/regions/regions-link-fn-args.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/regions/regions-link-fn-args.rs b/tests/ui/regions/regions-link-fn-args.rs new file mode 100644 index 000000000..231407b22 --- /dev/null +++ b/tests/ui/regions/regions-link-fn-args.rs @@ -0,0 +1,15 @@ +// run-pass +// Test that region inference correctly links up the regions when a +// `ref` borrow occurs inside a fn argument. + +// pretty-expanded FIXME #23616 + +#![allow(dead_code)] + +fn with<'a, F>(_: F) where F: FnOnce(&'a Vec<isize>) -> &'a Vec<isize> { } + +fn foo() { + with(|&ref ints| ints); +} + +fn main() { } |