]> git.lizzy.rs Git - rust.git/commitdiff
Remove duplicate attr_to_string
authorMark Rousskov <mark.simulacrum@gmail.com>
Fri, 5 Jul 2019 16:16:41 +0000 (12:16 -0400)
committerMark Rousskov <mark.simulacrum@gmail.com>
Wed, 10 Jul 2019 11:11:29 +0000 (07:11 -0400)
attribute_to_string exists.

src/libsyntax/parse/token.rs
src/libsyntax/print/pprust.rs

index fccb556b95ad8acf37fb36894323bf3459e955b7..472e4b474d627513c1c279e0ef94d89ef131200a 100644 (file)
@@ -816,7 +816,7 @@ fn prepend_attrs(sess: &ParseSess,
         assert_eq!(attr.style, ast::AttrStyle::Outer,
                    "inner attributes should prevent cached tokens from existing");
 
-        let source = pprust::attr_to_string(attr);
+        let source = pprust::attribute_to_string(attr);
         let macro_filename = FileName::macro_expansion_source_code(&source);
         if attr.is_sugared_doc {
             let stream = parse_stream_from_source_str(macro_filename, source, sess, Some(span));
index a69dd94cfb69bd3cbf5abd7c5da6ca5dd8c45bd0..4a3abe505caa1e51abe39dcaefe8a2d715cd11d2 100644 (file)
@@ -350,10 +350,6 @@ pub fn stmt_to_string(stmt: &ast::Stmt) -> String {
     to_string(|s| s.print_stmt(stmt))
 }
 
-pub fn attr_to_string(attr: &ast::Attribute) -> String {
-    to_string(|s| s.print_attribute(attr))
-}
-
 pub fn item_to_string(i: &ast::Item) -> String {
     to_string(|s| s.print_item(i))
 }