forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix issue rust-lang#3535 and add colon between mode and type when dum…
…ping funcion prototype
- Loading branch information
1 parent
dbc00ce
commit 19bd5ae
Showing
4 changed files
with
54 additions
and
18 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//error-pattern: mismatched types | ||
|
||
fn bad(&a: int) { | ||
} | ||
|
||
// unnamed argument &int is now parsed x: &int | ||
// it's not parsed &x: int anymore | ||
|
||
fn called(f: fn(&int)) { | ||
} | ||
|
||
fn main() { | ||
called(bad); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
fn good(a: &int) { | ||
} | ||
|
||
// unnamed argument &int is now parse x: &int | ||
|
||
fn called(f: fn(&int)) { | ||
} | ||
|
||
fn main() { | ||
called(good); | ||
} |