You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The example from a comment in #1458, which compiled but didn't pretty-print correctly, no longer compiles:
fn plus_one(f: fn() -> int) -> int {
return f() + 1;
}
fn ret_plus_one() -> fn(fn() -> int) -> int {
return plus_one;
}
fn main() {
let z = do ret_plus_one() || { 2 };
assert z == 3;
}
issue-1458.rs:10:15: 10:32 error: this function takes 0 parameters but 1 parameter was supplied
issue-1458.rs:10 let z = do ret_plus_one() || { 2 };
^~~~~~~~~~~~~~~~~
issue-1458.rs:10:28: 10:38 error: Non-function passed to a `do` function as its last argument, or wrong number of arguments passed to a `do` function
issue-1458.rs:10 let z = do ret_plus_one() || { 2 };
The text was updated successfully, but these errors were encountered:
The example from a comment in #1458, which compiled but didn't pretty-print correctly, no longer compiles:
The text was updated successfully, but these errors were encountered: