diff options
Diffstat (limited to 'crates/ra_hir_def/src/generics.rs')
-rw-r--r-- | crates/ra_hir_def/src/generics.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir_def/src/generics.rs b/crates/ra_hir_def/src/generics.rs index 2b13748f3..e9c28c730 100644 --- a/crates/ra_hir_def/src/generics.rs +++ b/crates/ra_hir_def/src/generics.rs | |||
@@ -6,7 +6,7 @@ use std::sync::Arc; | |||
6 | 6 | ||
7 | use either::Either; | 7 | use either::Either; |
8 | use hir_expand::{ | 8 | use hir_expand::{ |
9 | name::{AsName, Name, N}, | 9 | name::{name, AsName, Name}, |
10 | InFile, | 10 | InFile, |
11 | }; | 11 | }; |
12 | use ra_arena::{map::ArenaMap, Arena}; | 12 | use ra_arena::{map::ArenaMap, Arena}; |
@@ -90,11 +90,11 @@ impl GenericParams { | |||
90 | 90 | ||
91 | // traits get the Self type as an implicit first type parameter | 91 | // traits get the Self type as an implicit first type parameter |
92 | let self_param_id = | 92 | let self_param_id = |
93 | generics.types.alloc(TypeParamData { name: N![Self], default: None }); | 93 | generics.types.alloc(TypeParamData { name: name![Self], default: None }); |
94 | sm.insert(self_param_id, Either::Left(src.value.clone())); | 94 | sm.insert(self_param_id, Either::Left(src.value.clone())); |
95 | // add super traits as bounds on Self | 95 | // add super traits as bounds on Self |
96 | // i.e., trait Foo: Bar is equivalent to trait Foo where Self: Bar | 96 | // i.e., trait Foo: Bar is equivalent to trait Foo where Self: Bar |
97 | let self_param = TypeRef::Path(N![Self].into()); | 97 | let self_param = TypeRef::Path(name![Self].into()); |
98 | generics.fill_bounds(&src.value, self_param); | 98 | generics.fill_bounds(&src.value, self_param); |
99 | 99 | ||
100 | generics.fill(&mut sm, &src.value); | 100 | generics.fill(&mut sm, &src.value); |