From bdd6d2c35ed4d280d3112a3fd97710b53129255c Mon Sep 17 00:00:00 2001 From: mcarton Date: Sun, 5 Jun 2016 15:47:57 +0200 Subject: [PATCH] Fix wrong suggestion in `MANUAL_SWAP` --- clippy_lints/src/swap.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_lints/src/swap.rs b/clippy_lints/src/swap.rs index 6dc9dda37..a518e15ea 100644 --- a/clippy_lints/src/swap.rs +++ b/clippy_lints/src/swap.rs @@ -85,7 +85,7 @@ fn check_manual_swap(cx: &LateContext, block: &Block) { ("".to_owned(), "".to_owned(), "".to_owned()) }; - let span = mk_sp(tmp.span.lo, second.span.hi); + let span = mk_sp(w[0].span.lo, second.span.hi); span_lint_and_then(cx, MANUAL_SWAP,