diff options
| author | bors <bors@rust-lang.org> | 2016-06-10 16:55:30 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-06-10 16:55:30 -0700 |
| commit | 0554abac637800415bb1b30d8656898552a55ea0 (patch) | |
| tree | 1aae3d269b30644ece7c8864c9c7e181f35985ca /src/libsyntax | |
| parent | 8c6bd23aaad573d5e06de6b6f0b0e64cf3d916de (diff) | |
| parent | c751ec626da92a138f23327f3eaede30d5747bde (diff) | |
| download | rust-0554abac637800415bb1b30d8656898552a55ea0.tar.gz rust-0554abac637800415bb1b30d8656898552a55ea0.zip | |
Auto merge of #34172 - jseyfried:avoid_configuring_interpolated_ast, r=alexcrichton
Fix ICE regression caused by configuring interpolated AST Fixes #34171. r? @nrc
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/config.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libsyntax/config.rs b/src/libsyntax/config.rs index c164e89c52f..41ad1611e3e 100644 --- a/src/libsyntax/config.rs +++ b/src/libsyntax/config.rs @@ -14,6 +14,7 @@ use feature_gate::GatedCfgAttr; use fold::Folder; use {ast, fold, attr}; use codemap::{Spanned, respan}; +use parse::token; use ptr::P; use util::small_vector::SmallVector; @@ -247,6 +248,12 @@ impl<T: CfgFolder> fold::Folder for T { self.configure(item).map(|item| fold::noop_fold_trait_item(item, self)) .unwrap_or(SmallVector::zero()) } + + fn fold_interpolated(&mut self, nt: token::Nonterminal) -> token::Nonterminal { + // Don't configure interpolated AST (c.f. #34171). + // Interpolated AST will get configured once the surrounding tokens are parsed. + nt + } } fn fold_expr<F: CfgFolder>(folder: &mut F, expr: P<ast::Expr>) -> P<ast::Expr> { |
