]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_expand/src/base.rs
Remove unused code from remaining compiler crates
[rust.git] / compiler / rustc_expand / src / base.rs
index f7651ca0ba6dd1e23d53b38340ccc144fb8ec4b7..b0e43a260e91de82cd5aaa6cbeb8f8f9f0bef87c 100644 (file)
@@ -148,17 +148,6 @@ pub fn expect_item(self) -> P<ast::Item> {
         }
     }
 
-    pub fn map_item_or<F, G>(self, mut f: F, mut or: G) -> Annotatable
-    where
-        F: FnMut(P<ast::Item>) -> P<ast::Item>,
-        G: FnMut(Annotatable) -> Annotatable,
-    {
-        match self {
-            Annotatable::Item(i) => Annotatable::Item(f(i)),
-            _ => or(self),
-        }
-    }
-
     pub fn expect_trait_item(self) -> P<ast::AssocItem> {
         match self {
             Annotatable::TraitItem(i) => i,
@@ -1052,9 +1041,6 @@ pub fn std_path(&self, components: &[Symbol]) -> Vec<Ident> {
             .chain(components.iter().map(|&s| Ident::with_dummy_span(s)))
             .collect()
     }
-    pub fn name_of(&self, st: &str) -> Symbol {
-        Symbol::intern(st)
-    }
 
     pub fn check_unused_macros(&mut self) {
         self.resolver.check_unused_macros();