Make the unused_mut lint smarter with respect to locals.

Fixes #26332
This commit is contained in:
Ariel Ben-Yehuda
2015-06-18 01:02:58 +03:00
committed by Ariel Ben-Yehuda
parent 2f45294a50
commit a18d9842ed
7 changed files with 23 additions and 23 deletions

View File

@@ -2655,8 +2655,8 @@ macro_rules! step_impl_signed {
#[allow(trivial_numeric_casts)]
fn steps_between(start: &$t, end: &$t, by: &$t) -> Option<usize> {
if *by == 0 { return None; }
let mut diff: usize;
let mut by_u: usize;
let diff: usize;
let by_u: usize;
if *by > 0 {
if *start >= *end {
return Some(0);