]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_passes/entry.rs
Use Arena inside hir::ImplItem.
[rust.git] / src / librustc_passes / entry.rs
index d0cedc08162c8a16347937878b98376fd3a2e190..77ee6ce8513c1f9e0771cf5206b07b2753056c96 100644 (file)
@@ -33,18 +33,18 @@ struct EntryContext<'a, 'tcx> {
 }
 
 impl<'a, 'tcx> ItemLikeVisitor<'tcx> for EntryContext<'a, 'tcx> {
-    fn visit_item(&mut self, item: &'tcx Item) {
+    fn visit_item(&mut self, item: &'tcx Item<'tcx>) {
         let def_id = self.map.local_def_id(item.hir_id);
         let def_key = self.map.def_key(def_id);
         let at_root = def_key.parent == Some(CRATE_DEF_INDEX);
         find_item(item, self, at_root);
     }
 
-    fn visit_trait_item(&mut self, _trait_item: &'tcx TraitItem) {
+    fn visit_trait_item(&mut self, _trait_item: &'tcx TraitItem<'tcx>) {
         // Entry fn is never a trait item.
     }
 
-    fn visit_impl_item(&mut self, _impl_item: &'tcx ImplItem) {
+    fn visit_impl_item(&mut self, _impl_item: &'tcx ImplItem<'tcx>) {
         // Entry fn is never a trait item.
     }
 }
@@ -81,7 +81,7 @@ fn entry_fn(tcx: TyCtxt<'_>, cnum: CrateNum) -> Option<(DefId, EntryFnType)> {
 
 // Beware, this is duplicated in `libsyntax/entry.rs`, so make sure to keep
 // them in sync.
-fn entry_point_type(item: &Item, at_root: bool) -> EntryPointType {
+fn entry_point_type(item: &Item<'_>, at_root: bool) -> EntryPointType {
     match item.kind {
         ItemKind::Fn(..) => {
             if attr::contains_name(&item.attrs, sym::start) {
@@ -104,7 +104,7 @@ fn entry_point_type(item: &Item, at_root: bool) -> EntryPointType {
 }
 
 
-fn find_item(item: &Item, ctxt: &mut EntryContext<'_, '_>, at_root: bool) {
+fn find_item(item: &Item<'_>, ctxt: &mut EntryContext<'_, '_>, at_root: bool) {
     match entry_point_type(item, at_root) {
         EntryPointType::MainNamed => {
             if ctxt.main_fn.is_none() {