Skip to content

Commit

Permalink
Avoid configuring interpolated items.
Browse files Browse the repository at this point in the history
  • Loading branch information
jseyfried committed Jun 9, 2016
1 parent 8519139 commit 8254e55
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/libsyntax/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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> {
Expand Down

0 comments on commit 8254e55

Please sign in to comment.