Skip to content

Commit

Permalink
Avoid expanding decorator-generated items twice
Browse files Browse the repository at this point in the history
  • Loading branch information
jseyfried committed Jun 16, 2016
1 parent bb4a79b commit 83d283b
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/libsyntax/ext/expand.rs
Expand Up @@ -787,8 +787,6 @@ fn decorate(a: Annotatable, fld: &mut MacroExpander) -> SmallVector<Annotatable>
let mut decorator_items = SmallVector::zero();
let mut new_attrs = Vec::new();
expand_decorators(a.clone(), fld, &mut decorator_items, &mut new_attrs);
let decorator_items =
decorator_items.into_iter().flat_map(|a| expand_annotatable(a, fld)).collect();

let mut new_items = SmallVector::one(a.fold_attrs(new_attrs));
new_items.push_all(decorator_items);
Expand Down

0 comments on commit 83d283b

Please sign in to comment.