diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index a3dd77b8197..e45b7c1df91 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -3855,7 +3855,7 @@ impl<'a> Parser<'a> { /// ``` /// where T : Trait + 'b, 'a : 'b /// ``` - fn parse_where_clause(&mut self) -> PResult { + pub fn parse_where_clause(&mut self) -> PResult { let mut where_clause = WhereClause { id: ast::DUMMY_NODE_ID, predicates: Vec::new(), diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 46d196d13fa..cb743eff36c 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -352,6 +352,10 @@ pub fn stmt_to_string(stmt: &ast::Stmt) -> String { $to_string(|s| s.print_stmt(stmt)) } +pub fn attr_to_string(attr: &ast::Attr) -> String { + $to_string(|s| s.print_attribute(attr)) +} + pub fn item_to_string(i: &ast::Item) -> String { $to_string(|s| s.print_item(i)) }