diff --git a/src/librustc_borrowck/borrowck/unused.rs b/src/librustc_borrowck/borrowck/unused.rs index ddee122d0a6..f00a1c24bc3 100644 --- a/src/librustc_borrowck/borrowck/unused.rs +++ b/src/librustc_borrowck/borrowck/unused.rs @@ -77,7 +77,7 @@ impl<'a, 'tcx> UnusedMutCx<'a, 'tcx> { continue } - let mut_span = tcx.sess.codemap().span_until_char(ids[0].2, ' '); + let mut_span = tcx.sess.codemap().span_through_char(ids[0].2, ' '); // Ok, every name wasn't used mutably, so issue a warning that this // didn't need to be mutable. diff --git a/src/test/ui/lint/suggestions.stderr b/src/test/ui/lint/suggestions.stderr index 8b30f552d37..d04884d29cc 100644 --- a/src/test/ui/lint/suggestions.stderr +++ b/src/test/ui/lint/suggestions.stderr @@ -22,7 +22,7 @@ warning: variable does not need to be mutable --> $DIR/suggestions.rs:46:13 | 46 | let mut a = (1); // should suggest no `mut`, no parens - | ---^^ + | ----^ | | | help: remove this `mut` |