diff options
| author | bors <bors@rust-lang.org> | 2020-10-31 17:09:38 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-10-31 17:09:38 +0000 |
| commit | 4f7612ac1499258025077f1fd05d2f429f9accfb (patch) | |
| tree | 314e6ed97dbc2ace70df03241836406f6558989d /compiler/rustc_interface/src | |
| parent | 3478d7c3607ffbba629af2265c01002771e48c18 (diff) | |
| parent | 1873ca55b3fa296a149eaf57b975583dc40cf67b (diff) | |
| download | rust-4f7612ac1499258025077f1fd05d2f429f9accfb.tar.gz rust-4f7612ac1499258025077f1fd05d2f429f9accfb.zip | |
Auto merge of #78594 - m-ou-se:rollup-h5c8frs, r=m-ou-se
Rollup of 7 pull requests Successful merges: - #74622 (Add std::panic::panic_any.) - #77099 (make exp_m1 and ln_1p examples more representative of use) - #78526 (Strip tokens from trait and impl items before printing AST JSON) - #78550 (x.py setup: Create config.toml in the current directory, not the top-level directory) - #78577 (validator: Extend aliasing check to a call terminator) - #78581 (Constantify more BTreeMap and BTreeSet functions) - #78587 (parser: Cleanup `LazyTokenStream` and avoid some clones) Failed merges: r? `@ghost`
Diffstat (limited to 'compiler/rustc_interface/src')
| -rw-r--r-- | compiler/rustc_interface/src/passes.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index 9dbd59506b1..a1487aa0060 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -70,6 +70,17 @@ impl mut_visit::MutVisitor for TokenStripper { i.tokens = None; mut_visit::noop_flat_map_foreign_item(i, self) } + fn flat_map_trait_item( + &mut self, + mut i: P<ast::AssocItem>, + ) -> SmallVec<[P<ast::AssocItem>; 1]> { + i.tokens = None; + mut_visit::noop_flat_map_assoc_item(i, self) + } + fn flat_map_impl_item(&mut self, mut i: P<ast::AssocItem>) -> SmallVec<[P<ast::AssocItem>; 1]> { + i.tokens = None; + mut_visit::noop_flat_map_assoc_item(i, self) + } fn visit_block(&mut self, b: &mut P<ast::Block>) { b.tokens = None; mut_visit::noop_visit_block(b, self); |
