X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustc_resolve%2Flate.rs;h=8d11c7224c7044b9e1432004b96097373728c88c;hb=c5bb2ec0dd1f6f38117ec0e7e22c077a4b74dc09;hp=9c8425975119d29b0d35863d2dc8e5bd0f4f93e4;hpb=3b0438aa7b8e88a5c2dc3f802ab1de8de51e7b4c;p=rust.git diff --git a/src/librustc_resolve/late.rs b/src/librustc_resolve/late.rs index 9c842597511..8d11c7224c7 100644 --- a/src/librustc_resolve/late.rs +++ b/src/librustc_resolve/late.rs @@ -30,6 +30,8 @@ use std::collections::BTreeSet; use std::mem::replace; +use rustc_error_codes::*; + mod diagnostics; type Res = def::Res; @@ -730,8 +732,7 @@ fn resolve_item(&mut self, item: &Item) { match item.kind { ItemKind::TyAlias(_, ref generics) | - ItemKind::OpaqueTy(_, ref generics) | - ItemKind::Fn(_, _, ref generics, _) => { + ItemKind::Fn(_, ref generics, _) => { self.with_generic_param_rib(generics, ItemRibKind(HasGenericParams::Yes), |this| visit::walk_item(this, item)); } @@ -1085,18 +1086,6 @@ fn resolve_implementation(&mut self, this.visit_ty(ty); } - ImplItemKind::OpaqueTy(ref bounds) => { - // If this is a trait impl, ensure the type - // exists in trait - this.check_trait_item(impl_item.ident, - TypeNS, - impl_item.span, - |n, s| TypeNotMemberOfTrait(n, s)); - - for bound in bounds { - this.visit_param_bound(bound); - } - } ImplItemKind::Macro(_) => panic!("unexpanded macro in resolve!"), } @@ -1765,7 +1754,9 @@ fn resolve_qpath( fn with_resolved_label(&mut self, label: Option