Created
May 19, 2012 00:37
-
-
Save lkuper/2728360 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn not_ok(a: &uint) { | |
let mut g: fn@(x: &uint) = fn@(x: &r.uint) {}; | |
g(a); | |
} | |
fn main() { | |
} | |
lkuper@lenny:~/rust/build$ x86_64-unknown-linux-gnu/stage0/bin/rustc --debug-rustc ../src/test/run-pass/regions-fn-subtyping-2.rs | |
../src/test/run-pass/regions-fn-subtyping-2.rs:4:33: 4:49 error: mismatched types: expected `fn@(&uint)` but found `fn@(&r.uint)` (references with lifetime & do not necessarily outlive references with lifetime &r) | |
../src/test/run-pass/regions-fn-subtyping-2.rs:4 let mut g: fn@(x: &uint) = fn@(x: &r.uint) {}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment