aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/item_tree/lower.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def/src/item_tree/lower.rs')
-rw-r--r--crates/hir_def/src/item_tree/lower.rs5
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
3use std::{collections::hash_map::Entry, mem, sync::Arc}; 3use std::{collections::hash_map::Entry, mem, sync::Arc};
4 4
5use arena::map::ArenaMap;
6use hir_expand::{ast_id_map::AstIdMap, hygiene::Hygiene, name::known, HirFileId}; 5use hir_expand::{ast_id_map::AstIdMap, hygiene::Hygiene, name::known, HirFileId};
7use smallvec::SmallVec; 6use smallvec::SmallVec;
8use syntax::{ 7use 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());