diff options
Diffstat (limited to 'tests/ui/regions/regions-addr-of-ret.rs')
-rw-r--r-- | tests/ui/regions/regions-addr-of-ret.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/regions/regions-addr-of-ret.rs b/tests/ui/regions/regions-addr-of-ret.rs new file mode 100644 index 000000000..e5dcd6db0 --- /dev/null +++ b/tests/ui/regions/regions-addr-of-ret.rs @@ -0,0 +1,9 @@ +// run-pass +fn f(x: &isize) -> &isize { + return &*x; +} + +pub fn main() { + let three = &3; + println!("{}", *f(three)); +} |