Reuse 'kind' parameter.

This commit is contained in:
Jesper Steen Møller 2019-05-02 08:31:15 +02:00
parent 719890502e
commit 42255d93ef

View File

@ -4662,7 +4662,7 @@ fn get_traits_in_module_containing_item(&mut self,
fn find_transitive_imports(&mut self, mut kind: &NameBindingKind<'_>,
trait_name: &Ident) -> SmallVec<[NodeId; 1]> {
let mut import_ids = smallvec![];
while let NameBindingKind::Import { directive, binding, .. } = *kind {
while let NameBindingKind::Import { directive, binding, .. } = kind {
self.maybe_unused_trait_imports.insert(directive.id);
self.add_to_glob_map(&directive, *trait_name);
import_ids.push(directive.id);