Include space in suggestion mut in bindings

This commit is contained in:
Esteban Küber 2018-01-15 13:01:05 -08:00
parent bacb5c58df
commit a8f77e12fc
2 changed files with 2 additions and 2 deletions

View File

@ -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.

View File

@ -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`
|