14 lines
218 B
Rust
14 lines
218 B
Rust
|
// 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() {
|
||
|
}
|
||
|
|
||
|
|