diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2017-11-20 13:34:24 -0500 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2017-11-20 13:34:24 -0500 |
| commit | 2151e482acee9a8715a4bde3cfd477c4ecc20b0b (patch) | |
| tree | a75869a0d2d49e4150d607a3a56ef035171924a5 | |
| parent | df6fdbc9ae333faf7963470d0a27cf3ed4f24f65 (diff) | |
| download | rust-2151e482acee9a8715a4bde3cfd477c4ecc20b0b.tar.gz rust-2151e482acee9a8715a4bde3cfd477c4ecc20b0b.zip | |
fix example for E0644
| -rw-r--r-- | src/librustc/diagnostics.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/librustc/diagnostics.rs b/src/librustc/diagnostics.rs index 9b0483d00a4..fe3f1bbbe8c 100644 --- a/src/librustc/diagnostics.rs +++ b/src/librustc/diagnostics.rs @@ -1982,10 +1982,9 @@ fn fix<F>(f: &F) } fn main() { - let x = |y| { + fix(&|y| { // Here, when `x` is called, the parameter `y` is equal to `x`. - }; - fix(&x); + }); } ``` |
