]> git.lizzy.rs Git - rust.git/commitdiff
rollup merge of #17114 : nick29581/dst-type
authorAlex Crichton <alex@alexcrichton.com>
Tue, 9 Sep 2014 14:39:23 +0000 (07:39 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 9 Sep 2014 19:07:14 +0000 (12:07 -0700)
1  2 
src/librustc/middle/resolve.rs

index 3026b5c24c1a4be6e2397701d83c9dd2a8490661,ae3a109a505a388a9db7469838e61be9018fd72b..854b8b9ba77112337d729054f7676badf65ef1e3
@@@ -1549,13 -1549,18 +1549,13 @@@ impl<'a> Resolver<'a> 
                              PathListMod { .. } => Some(item.span),
                              _ => None
                          }).collect::<Vec<Span>>();
 -                        match mod_spans.as_slice() {
 -                            [first, second, ..other] => {
 -                                self.resolve_error(first,
 -                                    "`mod` import can only appear once in the list");
 -                                self.session.span_note(second,
 -                                        "another `mod` import appears here");
 -                                for &other_span in other.iter() {
 -                                    self.session.span_note(other_span,
 -                                        "another `mod` import appears here");
 -                                }
 -                            },
 -                            [_] | [] => ()
 +                        if mod_spans.len() > 1 {
 +                            self.resolve_error(mod_spans[0],
 +                                "`mod` import can only appear once in the list");
 +                            for other_span in mod_spans.iter().skip(1) {
 +                                self.session.span_note(*other_span,
 +                                    "another `mod` import appears here");
 +                            }
                          }
  
                          for source_item in source_items.iter() {
                                                                 item.id,
                                                                 ItemRibKind),
                                               |this| {
+                     this.resolve_type_parameters(&generics.ty_params);
                      visit::walk_item(this, item, ());
                  });
              }