diff options
| -rw-r--r-- | src/librustc/middle/typeck/check/mod.rs | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/librustc/middle/typeck/check/mod.rs b/src/librustc/middle/typeck/check/mod.rs index d882ee5d0e5..ca5d711d360 100644 --- a/src/librustc/middle/typeck/check/mod.rs +++ b/src/librustc/middle/typeck/check/mod.rs @@ -693,16 +693,6 @@ pub fn check_item(ccx: &CrateCtxt, it: &ast::Item) { debug!("ItemImpl {} with id {}", token::get_ident(it.ident), it.id); let impl_pty = ty::lookup_item_type(ccx.tcx, ast_util::local_def(it.id)); - for impl_item in impl_items.iter() { - match *impl_item { - ast::MethodImplItem(ref m) => { - check_method_body(ccx, &impl_pty.generics, &**m); - } - ast::TypeImplItem(_) => { - // Nothing to do here. - } - } - } match *opt_trait_ref { Some(ref ast_trait_ref) => { @@ -717,6 +707,17 @@ pub fn check_item(ccx: &CrateCtxt, it: &ast::Item) { None => { } } + for impl_item in impl_items.iter() { + match *impl_item { + ast::MethodImplItem(ref m) => { + check_method_body(ccx, &impl_pty.generics, &**m); + } + ast::TypeImplItem(_) => { + // Nothing to do here. + } + } + } + } ast::ItemTrait(_, _, _, ref trait_methods) => { let trait_def = ty::lookup_trait_def(ccx.tcx, local_def(it.id)); |
