mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
Move two fn assignability tests from compile-fail to run-pass
This commit is contained in:
parent
234df9cae0
commit
8336cad95d
@ -5,6 +5,6 @@ fn add(n: int) -> fn@(int) -> int {
|
||||
fn main()
|
||||
{
|
||||
assert add(3)(4) == 7;
|
||||
let add3 : fn(int)->int = add(3); //~ ERROR mismatched types
|
||||
let add3 : fn(int)->int = add(3);
|
||||
assert add3(4) == 7;
|
||||
}
|
@ -12,6 +12,6 @@ fn main()
|
||||
let add2 : &(fn@(int)->int) = &add(2);
|
||||
assert (*add2)(5) == 7;
|
||||
|
||||
let add3 : fn(int)->int = add(3); //~ ERROR mismatched types
|
||||
let add3 : fn(int)->int = add(3);
|
||||
assert add3(4) == 7;
|
||||
}
|
Loading…
Reference in New Issue
Block a user