Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-expand/src/builtin/derive_macro.rs')
-rw-r--r--crates/hir-expand/src/builtin/derive_macro.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/crates/hir-expand/src/builtin/derive_macro.rs b/crates/hir-expand/src/builtin/derive_macro.rs
index bfd7dffb05..8f513a2bcf 100644
--- a/crates/hir-expand/src/builtin/derive_macro.rs
+++ b/crates/hir-expand/src/builtin/derive_macro.rs
@@ -22,7 +22,7 @@ use crate::{
use syntax::{
ast::{
self, AstNode, FieldList, HasAttrs, HasGenericArgs, HasGenericParams, HasModuleItem,
- HasName, HasTypeBounds, make, syntax_factory::SyntaxFactory,
+ HasName, HasTypeBounds, make,
},
syntax_editor::{GetOrCreateWhereClause, SyntaxEditor},
ted,
@@ -1294,10 +1294,8 @@ fn coerce_pointee_expand(
));
}
- let (mut editor, strukt) = SyntaxEditor::with_ast_node(strukt);
- let make = SyntaxFactory::with_mappings();
- strukt.get_or_create_where_clause(&mut editor, &make, new_predicates.into_iter());
- editor.add_mappings(make.finish_with_mappings());
+ let (editor, strukt) = SyntaxEditor::with_ast_node(strukt);
+ strukt.get_or_create_where_clause(&editor, new_predicates.into_iter());
let edit = editor.finish();
let strukt = ast::Struct::cast(edit.new_root().clone()).unwrap();
let adt = ast::Adt::Struct(strukt.clone());