Avoid configuring interpolated items.
This commit is contained in:
parent
8519139ab4
commit
8254e55760
1 changed files with 7 additions and 0 deletions
|
|
@ -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> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue