diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-01-15 14:11:54 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-01-15 14:11:54 -0800 |
| commit | b86a84867a31a04b9e9c35efc313b2961312def2 (patch) | |
| tree | 852a11b7ffd9afeec21572408ab3d1f18f8a1bcb | |
| parent | 7e2ef2cbc69291cfa6e4616891326608911a6736 (diff) | |
| parent | 428da78de10310744a33b5e5b7d85e1a11e8e7ed (diff) | |
| download | rust-b86a84867a31a04b9e9c35efc313b2961312def2.tar.gz rust-b86a84867a31a04b9e9c35efc313b2961312def2.zip | |
rollup merge of #21141: tcard/master
Really small correction. This anti-example in the Closures section is supposed to fail because of a borrow, but it was failing at the type inference because of insufficient type information. This makes it fail for the expected reason.
| -rw-r--r-- | src/doc/trpl/closures.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/doc/trpl/closures.md b/src/doc/trpl/closures.md index 5b49df92fe3..51a0bb69a7c 100644 --- a/src/doc/trpl/closures.md +++ b/src/doc/trpl/closures.md @@ -51,7 +51,7 @@ defined. The closure borrows any variables it uses, so this will error: ```{rust,ignore} fn main() { - let mut x = 5; + let mut x: i32 = 5; let printer = |&:| { println!("x is: {}", x); }; |
