1313//! which are available for use externally when compiled as a library.
1414
1515use std:: hashmap:: { HashSet , HashMap } ;
16- use std:: util ;
16+ use std:: mem :: replace ;
1717
1818use metadata:: csearch;
1919use middle:: resolve;
@@ -679,7 +679,7 @@ impl<'a> Visitor<()> for PrivacyVisitor<'a> {
679679 return ;
680680 }
681681
682- let orig_curitem = util :: replace ( & mut self . curitem , item. id ) ;
682+ let orig_curitem = replace ( & mut self . curitem , item. id ) ;
683683 visit:: walk_item ( self , item, ( ) ) ;
684684 self . curitem = orig_curitem;
685685 }
@@ -861,7 +861,7 @@ impl Visitor<()> for SanePrivacyVisitor {
861861 self . check_sane_privacy ( item) ;
862862 }
863863
864- let orig_in_fn = util :: replace ( & mut self . in_fn , match item. node {
864+ let orig_in_fn = replace ( & mut self . in_fn , match item. node {
865865 ast:: ItemMod ( ..) => false , // modules turn privacy back on
866866 _ => self . in_fn , // otherwise we inherit
867867 } ) ;
@@ -872,7 +872,7 @@ impl Visitor<()> for SanePrivacyVisitor {
872872 fn visit_fn ( & mut self , fk : & visit:: FnKind , fd : & ast:: FnDecl ,
873873 b : & ast:: Block , s : Span , n : ast:: NodeId , _: ( ) ) {
874874 // This catches both functions and methods
875- let orig_in_fn = util :: replace ( & mut self . in_fn , true ) ;
875+ let orig_in_fn = replace ( & mut self . in_fn , true ) ;
876876 visit:: walk_fn ( self , fk, fd, b, s, n, ( ) ) ;
877877 self . in_fn = orig_in_fn;
878878 }
0 commit comments