@@ -368,8 +368,8 @@ fn index_crate<'a>(
368368 krate : & ' a Crate ,
369369) -> IndexVec < LocalDefId , AstOwner < ' a > > {
370370 let mut indexer = Indexer { node_id_to_def_id, index : IndexVec :: new ( ) } ;
371- indexer. index . ensure_contains_elem ( CRATE_DEF_ID , || AstOwner :: NonOwner ) ;
372- indexer . index [ CRATE_DEF_ID ] = AstOwner :: Crate ( krate) ;
371+ * indexer. index . ensure_contains_elem ( CRATE_DEF_ID , || AstOwner :: NonOwner ) =
372+ AstOwner :: Crate ( krate) ;
373373 visit:: walk_crate ( & mut indexer, krate) ;
374374 return indexer. index ;
375375
@@ -386,22 +386,21 @@ fn index_crate<'a>(
386386
387387 fn visit_item ( & mut self , item : & ' a ast:: Item ) {
388388 let def_id = self . node_id_to_def_id [ & item. id ] ;
389- self . index . ensure_contains_elem ( def_id, || AstOwner :: NonOwner ) ;
390- self . index [ def_id] = AstOwner :: Item ( item) ;
389+ * self . index . ensure_contains_elem ( def_id, || AstOwner :: NonOwner ) = AstOwner :: Item ( item) ;
391390 visit:: walk_item ( self , item)
392391 }
393392
394393 fn visit_assoc_item ( & mut self , item : & ' a ast:: AssocItem , ctxt : visit:: AssocCtxt ) {
395394 let def_id = self . node_id_to_def_id [ & item. id ] ;
396- self . index . ensure_contains_elem ( def_id, || AstOwner :: NonOwner ) ;
397- self . index [ def_id ] = AstOwner :: AssocItem ( item, ctxt) ;
395+ * self . index . ensure_contains_elem ( def_id, || AstOwner :: NonOwner ) =
396+ AstOwner :: AssocItem ( item, ctxt) ;
398397 visit:: walk_assoc_item ( self , item, ctxt) ;
399398 }
400399
401400 fn visit_foreign_item ( & mut self , item : & ' a ast:: ForeignItem ) {
402401 let def_id = self . node_id_to_def_id [ & item. id ] ;
403- self . index . ensure_contains_elem ( def_id, || AstOwner :: NonOwner ) ;
404- self . index [ def_id ] = AstOwner :: ForeignItem ( item) ;
402+ * self . index . ensure_contains_elem ( def_id, || AstOwner :: NonOwner ) =
403+ AstOwner :: ForeignItem ( item) ;
405404 visit:: walk_foreign_item ( self , item) ;
406405 }
407406 }
0 commit comments