test: Add a simple test for dangling pointers
This commit is contained in:
parent
7c27ec72d1
commit
8bef2716fe
9
src/test/compile-fail/regions-ret.rs
Normal file
9
src/test/compile-fail/regions-ret.rs
Normal file
@ -0,0 +1,9 @@
|
||||
// error-pattern: mismatched types
|
||||
|
||||
fn f(x : &a.int) -> &a.int {
|
||||
ret &3;
|
||||
}
|
||||
|
||||
fn main() {
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user