-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
194 additions
and
88 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
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
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 |
---|---|---|
@@ -1,43 +1,59 @@ | ||
error[E0593]: closure takes 1 parameter but 2 parameters are required here | ||
error[E0593]: closure takes 0 arguments but 2 arguments are required | ||
--> $DIR/closure-arg-count.rs:12:15 | ||
| | ||
12 | [1, 2, 3].sort_by(|tuple| panic!()); | ||
| ^^^^^^^ ---------------- takes 1 parameter | ||
12 | [1, 2, 3].sort_by(|| panic!()); | ||
| ^^^^^^^ ----------- takes 0 arguments | ||
| | | ||
| expected closure that takes 2 parameters | ||
| expected closure that takes 2 arguments | ||
|
||
error[E0593]: closure takes 1 parameter but 2 parameters are required here | ||
error[E0593]: closure takes 0 arguments but 2 arguments are required | ||
--> $DIR/closure-arg-count.rs:12:15 | ||
| | ||
12 | [1, 2, 3].sort_by(|tuple| panic!()); | ||
| ^^^^^^^ ---------------- takes 1 parameter | ||
12 | [1, 2, 3].sort_by(|| panic!()); | ||
| ^^^^^^^ ----------- takes 0 arguments | ||
| | | ||
| expected closure that takes 2 parameters | ||
| expected closure that takes 2 arguments | ||
|
||
error[E0593]: closure takes 1 argument but 2 arguments are required | ||
--> $DIR/closure-arg-count.rs:13:15 | ||
| | ||
13 | [1, 2, 3].sort_by(|tuple| panic!()); | ||
| ^^^^^^^ ---------------- takes 1 argument | ||
| | | ||
| expected closure that takes 2 arguments | ||
|
||
error[E0593]: closure takes 1 argument but 2 arguments are required | ||
--> $DIR/closure-arg-count.rs:13:15 | ||
| | ||
13 | [1, 2, 3].sort_by(|tuple| panic!()); | ||
| ^^^^^^^ ---------------- takes 1 argument | ||
| | | ||
| expected closure that takes 2 arguments | ||
|
||
error[E0308]: mismatched types | ||
--> $DIR/closure-arg-count.rs:13:24 | ||
--> $DIR/closure-arg-count.rs:14:24 | ||
| | ||
13 | [1, 2, 3].sort_by(|(tuple, tuple2)| panic!()); | ||
14 | [1, 2, 3].sort_by(|(tuple, tuple2)| panic!()); | ||
| ^^^^^^^^^^^^^^^ expected &{integer}, found tuple | ||
| | ||
= note: expected type `&{integer}` | ||
found type `(_, _)` | ||
|
||
error[E0593]: closure takes 1 parameter but 2 parameters are required here | ||
--> $DIR/closure-arg-count.rs:13:15 | ||
error[E0593]: closure takes 1 argument but 2 arguments are required | ||
--> $DIR/closure-arg-count.rs:14:15 | ||
| | ||
13 | [1, 2, 3].sort_by(|(tuple, tuple2)| panic!()); | ||
| ^^^^^^^ -------------------------- takes 1 parameter | ||
14 | [1, 2, 3].sort_by(|(tuple, tuple2)| panic!()); | ||
| ^^^^^^^ -------------------------- takes 1 argument | ||
| | | ||
| expected closure that takes 2 parameters | ||
| expected closure that takes 2 arguments | ||
|
||
error[E0593]: closure takes 1 parameter but 2 parameters are required here | ||
--> $DIR/closure-arg-count.rs:13:15 | ||
error[E0593]: closure takes 1 argument but 2 arguments are required | ||
--> $DIR/closure-arg-count.rs:14:15 | ||
| | ||
13 | [1, 2, 3].sort_by(|(tuple, tuple2)| panic!()); | ||
| ^^^^^^^ -------------------------- takes 1 parameter | ||
14 | [1, 2, 3].sort_by(|(tuple, tuple2)| panic!()); | ||
| ^^^^^^^ -------------------------- takes 1 argument | ||
| | | ||
| expected closure that takes 2 parameters | ||
| expected closure that takes 2 arguments | ||
|
||
error: aborting due to 5 previous errors | ||
error: aborting due to 7 previous errors | ||
|
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