diff options
Diffstat (limited to 'src/doc/tutorial.md')
| -rw-r--r-- | src/doc/tutorial.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/doc/tutorial.md b/src/doc/tutorial.md index eca765f9b9f..bd1e9b27ccb 100644 --- a/src/doc/tutorial.md +++ b/src/doc/tutorial.md @@ -1736,7 +1736,7 @@ let closure = || -> () { println!("{}", x) }; // can capture enclosing scope // `fun_arg` is an invalid definition fn fun_arg (arg: int) -> () { println!("{}", arg + x) }; // cannot capture enclosing scope -let closure_arg = |arg: int| -> () { println!("{}", arg + x) }; // Can capture enclosing scope +let closure_arg = |arg: int| -> () { println!("{}", arg + x) }; // can capture enclosing scope // ^ // Requires a type because the implementation needs to know which `+` to use. // In the future, the implementation may not need the help. |
