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.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/hir-expand/src/builtin/derive_macro.rs b/crates/hir-expand/src/builtin/derive_macro.rs
index bfd7dffb05..11e1f9dd0c 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,
@@ -1295,9 +1295,7 @@ 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());
+ strukt.get_or_create_where_clause(&mut 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());