-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
196: API: Use patterns in `ClosureExpr` parameters r=xFrednet a=xFrednet This also removes the implementation of `CallableData` from `ClosureExpr` Closes #181 Co-authored-by: xFrednet <xFrednet@gmail.com>
- Loading branch information
Showing
7 changed files
with
387 additions
and
162 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
fn main() { | ||
let a = "Hey".to_string(); | ||
|
||
let _print_simple_closure = || { | ||
1 + 1; | ||
}; | ||
let _print_no_type: fn(u32) -> () = |x| { /*...*/ }; | ||
let _print_with_args = |x: u32, y: u32| x + y; | ||
let _print_move = move || a; | ||
let _print_pattern_in_arg: fn((u32, u32, u32)) -> () = |(a, b, c)| { /*...*/ }; | ||
// Make sure the infer type stays, if it originates from the source code | ||
let _print_infer_ty: fn(u32) -> () = |x: _| { /*...*/ }; | ||
} |
Oops, something went wrong.