Skip to content

Commit f6b4421

Browse files
committed
Merge pull request #21141 from tcard/master
[r+] TRPL: Anti-example failing for the wrong reason. Reviewed-by: nikomatsakis
2 parents 037b1f6 + 428da78 commit f6b4421

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/doc/trpl/closures.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ defined. The closure borrows any variables it uses, so this will error:
5151

5252
```{rust,ignore}
5353
fn main() {
54-
let mut x = 5;
54+
let mut x: i32 = 5;
5555
5656
let printer = |&:| { println!("x is: {}", x); };
5757

0 commit comments

Comments
 (0)