Skip to content

Commit 0f10d11

Browse files
Remove duplicate attr_to_string
attribute_to_string exists.
1 parent 9b0ebfa commit 0f10d11

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/libsyntax/parse/token.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ fn prepend_attrs(sess: &ParseSess,
816816
assert_eq!(attr.style, ast::AttrStyle::Outer,
817817
"inner attributes should prevent cached tokens from existing");
818818

819-
let source = pprust::attr_to_string(attr);
819+
let source = pprust::attribute_to_string(attr);
820820
let macro_filename = FileName::macro_expansion_source_code(&source);
821821
if attr.is_sugared_doc {
822822
let stream = parse_stream_from_source_str(macro_filename, source, sess, Some(span));

src/libsyntax/print/pprust.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,10 +350,6 @@ pub fn stmt_to_string(stmt: &ast::Stmt) -> String {
350350
to_string(|s| s.print_stmt(stmt))
351351
}
352352

353-
pub fn attr_to_string(attr: &ast::Attribute) -> String {
354-
to_string(|s| s.print_attribute(attr))
355-
}
356-
357353
pub fn item_to_string(i: &ast::Item) -> String {
358354
to_string(|s| s.print_item(i))
359355
}

0 commit comments

Comments
 (0)