test: Add a test case that ensures ret &EXPR works.
This commit is contained in:
parent
cba007e6c8
commit
cab4f1685b
1 changed files with 8 additions and 0 deletions
8
src/test/run-pass/regions-addr-of-ret.rs
Normal file
8
src/test/run-pass/regions-addr-of-ret.rs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fn f(x : &a.int) -> &a.int {
|
||||
ret &*x;
|
||||
}
|
||||
|
||||
fn main() {
|
||||
log(error, #fmt("%d", *f(&3)));
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue