diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-10-15 22:48:13 +0200 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-11-10 03:57:18 +0100 |
| commit | 4ae2728fa8052915414127dce28245eb8f70842a (patch) | |
| tree | 27cc54d90904091e4dc9bf7ae5fa3b41be4b6187 /src/libsyntax_expand/proc_macro.rs | |
| parent | be023ebe850261c6bb202a02a686827d821c3697 (diff) | |
| download | rust-4ae2728fa8052915414127dce28245eb8f70842a.tar.gz rust-4ae2728fa8052915414127dce28245eb8f70842a.zip | |
move syntax::parse -> librustc_parse
also move MACRO_ARGUMENTS -> librustc_parse
Diffstat (limited to 'src/libsyntax_expand/proc_macro.rs')
| -rw-r--r-- | src/libsyntax_expand/proc_macro.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libsyntax_expand/proc_macro.rs b/src/libsyntax_expand/proc_macro.rs index 51c368bbaa6..db981fae5c2 100644 --- a/src/libsyntax_expand/proc_macro.rs +++ b/src/libsyntax_expand/proc_macro.rs @@ -4,7 +4,6 @@ use crate::proc_macro_server; use syntax::ast::{self, ItemKind, Attribute, Mac}; use syntax::attr::{mark_used, mark_known}; use syntax::errors::{Applicability, FatalError}; -use syntax::parse; use syntax::symbol::sym; use syntax::token; use syntax::tokenstream::{self, TokenStream}; @@ -135,7 +134,11 @@ impl MultiItemModifier for ProcMacroDerive { let error_count_before = ecx.parse_sess.span_diagnostic.err_count(); let msg = "proc-macro derive produced unparseable tokens"; - let mut parser = parse::stream_to_parser(ecx.parse_sess, stream, Some("proc-macro derive")); + let mut parser = rustc_parse::stream_to_parser( + ecx.parse_sess, + stream, + Some("proc-macro derive"), + ); let mut items = vec![]; loop { @@ -200,7 +203,7 @@ crate fn collect_derives(cx: &mut ExtCtxt<'_>, attrs: &mut Vec<ast::Attribute>) if attr.get_normal_item().tokens.is_empty() { return Ok(Vec::new()); } - parse::parse_in_attr(cx.parse_sess, attr, |p| p.parse_derive_paths()) + rustc_parse::parse_in_attr(cx.parse_sess, attr, |p| p.parse_derive_paths()) }; match parse_derive_paths(attr) { |
