Skip to content

Commit a8f77e1

Browse files
committed
Include space in suggestion mut in bindings
1 parent bacb5c5 commit a8f77e1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/librustc_borrowck/borrowck/unused.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl<'a, 'tcx> UnusedMutCx<'a, 'tcx> {
7777
continue
7878
}
7979

80-
let mut_span = tcx.sess.codemap().span_until_char(ids[0].2, ' ');
80+
let mut_span = tcx.sess.codemap().span_through_char(ids[0].2, ' ');
8181

8282
// Ok, every name wasn't used mutably, so issue a warning that this
8383
// didn't need to be mutable.

src/test/ui/lint/suggestions.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ warning: variable does not need to be mutable
2222
--> $DIR/suggestions.rs:46:13
2323
|
2424
46 | let mut a = (1); // should suggest no `mut`, no parens
25-
| ---^^
25+
| ----^
2626
| |
2727
| help: remove this `mut`
2828
|

0 commit comments

Comments
 (0)