rust/src/test/run-pass/regions-equiv-fns.rs

14 lines
218 B
Rust
Raw Normal View History

// Before fn subtyping was properly implemented,
// we reported errors in this case:
fn ok(a: &uint) {
// Here &r is an alias for &:
let mut g: fn@(x: &uint) = fn@(x: &r/uint) {};
g(a);
}
fn main() {
}