Skip to content

Commit

Permalink
Remove extra semicolons
Browse files Browse the repository at this point in the history
  • Loading branch information
mdinger committed Apr 30, 2014
1 parent af0dd16 commit f79571f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/doc/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -1731,11 +1731,11 @@ they try to access `x`:
let x = 3;
// `fun` is an invalid definition
fn fun () -> () { println!("{}", x) }; // cannot capture enclosing scope
fn fun () -> () { println!("{}", x) } // cannot capture enclosing scope
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
fn fun_arg (arg: int) -> () { println!("{}", arg + x) } // cannot 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.
Expand Down

0 comments on commit f79571f

Please sign in to comment.