diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 79901177d1873..9cb410a8ae318 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1,4 +1,4 @@ -mod attr; +pub mod attr; mod expr; mod pat; mod item; diff --git a/src/libsyntax/parse/parser/attr.rs b/src/libsyntax/parse/parser/attr.rs index 463629de7a15e..6f7d1ead4c17c 100644 --- a/src/libsyntax/parse/parser/attr.rs +++ b/src/libsyntax/parse/parser/attr.rs @@ -65,7 +65,7 @@ impl<'a> Parser<'a> { /// /// If `permit_inner` is `true`, then a leading `!` indicates an inner /// attribute. - fn parse_attribute(&mut self, permit_inner: bool) -> PResult<'a, ast::Attribute> { + pub fn parse_attribute(&mut self, permit_inner: bool) -> PResult<'a, ast::Attribute> { debug!("parse_attribute: permit_inner={:?} self.token={:?}", permit_inner, self.token); diff --git a/src/libsyntax/parse/parser/module.rs b/src/libsyntax/parse/parser/module.rs index 3e88c98b85612..a0e4d2bbb7ac6 100644 --- a/src/libsyntax/parse/parser/module.rs +++ b/src/libsyntax/parse/parser/module.rs @@ -26,7 +26,7 @@ pub(super) struct ModulePathSuccess { impl<'a> Parser<'a> { /// Parses a source module as a crate. This is the main entry point for the parser. - crate fn parse_crate_mod(&mut self) -> PResult<'a, Crate> { + pub fn parse_crate_mod(&mut self) -> PResult<'a, Crate> { let lo = self.token.span; let krate = Ok(ast::Crate { attrs: self.parse_inner_attributes()?, diff --git a/src/test/ui-fulldeps/ast_stmt_expr_attr.rs b/src/test/ui-fulldeps/ast_stmt_expr_attr.rs index 5479119d812f8..927e2c0820eb2 100644 --- a/src/test/ui-fulldeps/ast_stmt_expr_attr.rs +++ b/src/test/ui-fulldeps/ast_stmt_expr_attr.rs @@ -18,7 +18,7 @@ use syntax::parse::new_parser_from_source_str; use syntax::parse::parser::Parser; use syntax::parse::token; use syntax::ptr::P; -use syntax::parse::attr::*; +use syntax::parse::parser::attr::*; use syntax::print::pprust; use std::fmt; diff --git a/src/test/ui-fulldeps/auxiliary/attr-plugin-test.rs b/src/test/ui-fulldeps/auxiliary/attr-plugin-test.rs index c053c71524876..3d08c1c9eeefa 100644 --- a/src/test/ui-fulldeps/auxiliary/attr-plugin-test.rs +++ b/src/test/ui-fulldeps/auxiliary/attr-plugin-test.rs @@ -5,9 +5,10 @@ extern crate rustc_driver; extern crate syntax; +extern crate syntax_expand; use rustc_driver::plugin::Registry; -use syntax::ext::base::SyntaxExtension; +use syntax_expand::base::SyntaxExtension; use syntax::feature_gate::AttributeType; use syntax::symbol::Symbol; diff --git a/src/test/ui-fulldeps/auxiliary/issue-40001-plugin.rs b/src/test/ui-fulldeps/auxiliary/issue-40001-plugin.rs index 6fb99b2c98361..bb0ebf693d0be 100644 --- a/src/test/ui-fulldeps/auxiliary/issue-40001-plugin.rs +++ b/src/test/ui-fulldeps/auxiliary/issue-40001-plugin.rs @@ -5,10 +5,11 @@ extern crate rustc; extern crate rustc_driver; extern crate syntax; +extern crate syntax_expand; use rustc_driver::plugin::Registry; use syntax::attr; -use syntax::ext::base::*; +use syntax_expand::base::*; use syntax::feature_gate::AttributeType::Whitelisted; use syntax::symbol::Symbol; diff --git a/src/test/ui-fulldeps/auxiliary/plugin-args.rs b/src/test/ui-fulldeps/auxiliary/plugin-args.rs index 5ff24cff23c55..cccdfea208327 100644 --- a/src/test/ui-fulldeps/auxiliary/plugin-args.rs +++ b/src/test/ui-fulldeps/auxiliary/plugin-args.rs @@ -4,14 +4,15 @@ #![feature(box_syntax, rustc_private)] extern crate syntax; +extern crate syntax_expand; extern crate syntax_pos; extern crate rustc; extern crate rustc_driver; use std::borrow::ToOwned; use syntax::ast; -use syntax::ext::base::{SyntaxExtension, SyntaxExtensionKind}; -use syntax::ext::base::{TTMacroExpander, ExtCtxt, MacResult, MacEager}; +use syntax_expand::base::{SyntaxExtension, SyntaxExtensionKind}; +use syntax_expand::base::{TTMacroExpander, ExtCtxt, MacResult, MacEager}; use syntax::print::pprust; use syntax::symbol::Symbol; use syntax_pos::Span; diff --git a/src/test/ui-fulldeps/auxiliary/roman-numerals.rs b/src/test/ui-fulldeps/auxiliary/roman-numerals.rs index 2b57e9289b525..3524f449c7452 100644 --- a/src/test/ui-fulldeps/auxiliary/roman-numerals.rs +++ b/src/test/ui-fulldeps/auxiliary/roman-numerals.rs @@ -10,13 +10,14 @@ #![feature(plugin_registrar, rustc_private)] extern crate syntax; +extern crate syntax_expand; extern crate syntax_pos; extern crate rustc; extern crate rustc_driver; use syntax::parse::token::{self, Token}; use syntax::tokenstream::{TokenTree, TokenStream}; -use syntax::ext::base::{ExtCtxt, MacResult, DummyResult, MacEager}; +use syntax_expand::base::{ExtCtxt, MacResult, DummyResult, MacEager}; use syntax_pos::Span; use rustc_driver::plugin::Registry;