Skip to content

Commit

Permalink
auto merge of #11415 : nick29581/rust/visit_trait_option, r=alexcrichton
Browse files Browse the repository at this point in the history
...Therefore, we should not iterate over it.
  • Loading branch information
bors committed Jan 11, 2014
2 parents f411b94 + 40d8a12 commit 5a6ca45
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/libsyntax/visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,13 @@ pub fn walk_item<E: Clone, V: Visitor<E>>(visitor: &mut V, item: &Item, env: E)
walk_enum_def(visitor, enum_definition, type_parameters, env)
}
ItemImpl(ref type_parameters,
ref trait_references,
typ,
ref methods) => {
ref trait_reference,
typ,
ref methods) => {
visitor.visit_generics(type_parameters, env.clone());
for trait_reference in trait_references.iter() {
walk_trait_ref(visitor, trait_reference, env.clone())
match *trait_reference {
Some(ref trait_reference) => walk_trait_ref(visitor, trait_reference, env.clone()),
None => ()
}
visitor.visit_ty(typ, env.clone());
for method in methods.iter() {
Expand Down

0 comments on commit 5a6ca45

Please sign in to comment.