diff options
Diffstat (limited to 'crates/hir_def/src/item_tree')
-rw-r--r-- | crates/hir_def/src/item_tree/lower.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/hir_def/src/item_tree/lower.rs b/crates/hir_def/src/item_tree/lower.rs index f7ce2e26d..2939c6b1e 100644 --- a/crates/hir_def/src/item_tree/lower.rs +++ b/crates/hir_def/src/item_tree/lower.rs | |||
@@ -2,7 +2,6 @@ | |||
2 | 2 | ||
3 | use std::{collections::hash_map::Entry, mem, sync::Arc}; | 3 | use std::{collections::hash_map::Entry, mem, sync::Arc}; |
4 | 4 | ||
5 | use arena::map::ArenaMap; | ||
6 | use hir_expand::{ast_id_map::AstIdMap, hygiene::Hygiene, name::known, HirFileId}; | 5 | use hir_expand::{ast_id_map::AstIdMap, hygiene::Hygiene, name::known, HirFileId}; |
7 | use smallvec::SmallVec; | 6 | use smallvec::SmallVec; |
8 | use syntax::{ | 7 | use syntax::{ |
@@ -607,7 +606,7 @@ impl Ctx { | |||
607 | owner: GenericsOwner<'_>, | 606 | owner: GenericsOwner<'_>, |
608 | node: &impl ast::GenericParamsOwner, | 607 | node: &impl ast::GenericParamsOwner, |
609 | ) -> GenericParamsId { | 608 | ) -> GenericParamsId { |
610 | let mut sm = &mut ArenaMap::default(); | 609 | let mut sm = &mut Default::default(); |
611 | let mut generics = GenericParams::default(); | 610 | let mut generics = GenericParams::default(); |
612 | match owner { | 611 | match owner { |
613 | GenericsOwner::Function(func) => { | 612 | GenericsOwner::Function(func) => { |
@@ -630,7 +629,7 @@ impl Ctx { | |||
630 | default: None, | 629 | default: None, |
631 | provenance: TypeParamProvenance::TraitSelf, | 630 | provenance: TypeParamProvenance::TraitSelf, |
632 | }); | 631 | }); |
633 | sm.insert(self_param_id, Either::Left(trait_def.clone())); | 632 | sm.type_params.insert(self_param_id, Either::Left(trait_def.clone())); |
634 | // add super traits as bounds on Self | 633 | // add super traits as bounds on Self |
635 | // i.e., trait Foo: Bar is equivalent to trait Foo where Self: Bar | 634 | // i.e., trait Foo: Bar is equivalent to trait Foo where Self: Bar |
636 | let self_param = TypeRef::Path(name![Self].into()); | 635 | let self_param = TypeRef::Path(name![Self].into()); |