Remove SyntaxRewriter::from_fn

This commit is contained in:
Lukas Wirth
2021-04-23 18:36:43 +02:00
parent 20f82191a0
commit e6e4417bbb
3 changed files with 24 additions and 31 deletions

View File

@@ -140,7 +140,8 @@ pub fn add_trait_assoc_items_to_impl(
let items = items
.into_iter()
.map(|it| ast_transform::apply(&*ast_transform, it))
.map(|it| it.clone_for_update())
.inspect(|it| ast_transform::apply(&*ast_transform, it))
.map(|it| match it {
ast::AssocItem::Fn(def) => ast::AssocItem::Fn(add_body(def)),
ast::AssocItem::TypeAlias(def) => ast::AssocItem::TypeAlias(def.remove_bounds()),