From 2151e482acee9a8715a4bde3cfd477c4ecc20b0b Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Mon, 20 Nov 2017 13:34:24 -0500 Subject: [PATCH] fix example for E0644 --- src/librustc/diagnostics.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/librustc/diagnostics.rs b/src/librustc/diagnostics.rs index 9b0483d00a44..fe3f1bbbe8c4 100644 --- a/src/librustc/diagnostics.rs +++ b/src/librustc/diagnostics.rs @@ -1982,10 +1982,9 @@ fn fix(f: &F) } fn main() { - let x = |y| { + fix(&|y| { // Here, when `x` is called, the parameter `y` is equal to `x`. - }; - fix(&x); + }); } ```