Place::Local(_) => panic!("should have move path for every Local"),
Place::Projection(_) => panic!("PrefixSet::All meant don't stop for Projection"),
Place::Promoted(_) |
- Place::Static(_) => return Err(NoMovePathFound::ReachedStatic),
+ Place::Static(_) => Err(NoMovePathFound::ReachedStatic),
}
}
}
// at this point, we have set up the error reporting state.
- if previously_initialized {
+ return if previously_initialized {
self.report_mutability_error(
place,
span,
error_access,
location,
);
- return true;
+ true
} else {
- return false;
- }
+ false
+ };
}
fn is_local_ever_initialized(&self,
return Some(index);
}
}
- return None;
+ None
}
/// Adds the place into the used mutable variables set