diff options
| author | bors <bors@rust-lang.org> | 2014-09-20 04:55:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-09-20 04:55:41 +0000 |
| commit | f7fb0f5a172bcde42293bf64ffafd1e5df4bd0f8 (patch) | |
| tree | 6f9513f09a30e3aae088a378d86a2c842ce8dd1e /src/libsyntax/ext | |
| parent | aef6c4b1382dcf2f943bd5872656625f935c0b7c (diff) | |
| parent | 5b42f79ff088bf3f9136f6f668a481097e22bed9 (diff) | |
| download | rust-f7fb0f5a172bcde42293bf64ffafd1e5df4bd0f8.tar.gz rust-f7fb0f5a172bcde42293bf64ffafd1e5df4bd0f8.zip | |
auto merge of #17319 : kmcallister/rust/method-macro-bt, r=pcwalton
We were leaving these on the stack, causing spurious backtraces.
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/expand.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index e173b93e468..70cf41d5e17 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -895,7 +895,10 @@ fn expand_method(m: P<ast::Method>, fld: &mut MacroExpander) -> SmallVector<P<as }; // expand again if necessary - new_methods.into_iter().flat_map(|m| fld.fold_method(m).into_iter()).collect() + let new_methods = new_methods.move_iter() + .flat_map(|m| fld.fold_method(m).into_iter()).collect(); + fld.cx.bt_pop(); + new_methods } }) } |
