Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8bef271

Browse files
committedMar 25, 2012
test: Add a simple test for dangling pointers
1 parent 7c27ec7 commit 8bef271

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
 

‎src/test/compile-fail/regions-ret.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// error-pattern: mismatched types
2+
3+
fn f(x : &a.int) -> &a.int {
4+
ret &3;
5+
}
6+
7+
fn main() {
8+
}
9+

0 commit comments

Comments
 (0)
Please sign in to comment.