diff options
| author | bors <bors@rust-lang.org> | 2016-12-17 06:43:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-12-17 06:43:16 +0000 |
| commit | f99d4dfef2cf3cbbf5699e44fddf019695e1d00d (patch) | |
| tree | 260767f07070b84f1c19a19eae4c0adc682f9afa /src/libsyntax/ext/tt/macro_parser.rs | |
| parent | d250169cb5a96481a3e7c8f9fe05de49f60e5ae5 (diff) | |
| parent | fd98a8d795b17b76ea6d1edcae55d4450efd466f (diff) | |
| download | rust-f99d4dfef2cf3cbbf5699e44fddf019695e1d00d.tar.gz rust-f99d4dfef2cf3cbbf5699e44fddf019695e1d00d.zip | |
Auto merge of #38205 - jseyfried:fix_module_directory_regression, r=eddyb
macros: fix the expected paths for a non-inline module matched by an `item` fragment Fixes #38190. r? @nrc
Diffstat (limited to 'src/libsyntax/ext/tt/macro_parser.rs')
| -rw-r--r-- | src/libsyntax/ext/tt/macro_parser.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs index 39ffab4dc17..2de31166070 100644 --- a/src/libsyntax/ext/tt/macro_parser.rs +++ b/src/libsyntax/ext/tt/macro_parser.rs @@ -83,7 +83,7 @@ use syntax_pos::{self, BytePos, mk_sp, Span}; use codemap::Spanned; use errors::FatalError; use parse::lexer::*; //resolve bug? -use parse::ParseSess; +use parse::{Directory, ParseSess}; use parse::parser::{PathStyle, Parser}; use parse::token::{DocComment, MatchNt, SubstNt}; use parse::token::{Token, Nonterminal}; @@ -407,8 +407,9 @@ fn inner_parse_loop(cur_eis: &mut SmallVector<Box<MatcherPos>>, Success(()) } -pub fn parse(sess: &ParseSess, rdr: TtReader, ms: &[TokenTree]) -> NamedParseResult { - let mut parser = Parser::new_with_doc_flag(sess, Box::new(rdr), true); +pub fn parse(sess: &ParseSess, rdr: TtReader, ms: &[TokenTree], directory: Option<Directory>) + -> NamedParseResult { + let mut parser = Parser::new(sess, Box::new(rdr), directory, true); let mut cur_eis = SmallVector::one(initial_matcher_pos(ms.to_owned(), parser.span.lo)); let mut next_eis = Vec::new(); // or proceed normally |
