diff options
Diffstat (limited to 'crates/ra_hir/src/ty/lower.rs')
-rw-r--r-- | crates/ra_hir/src/ty/lower.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/ra_hir/src/ty/lower.rs b/crates/ra_hir/src/ty/lower.rs index a604c02e2..003aa9bab 100644 --- a/crates/ra_hir/src/ty/lower.rs +++ b/crates/ra_hir/src/ty/lower.rs | |||
@@ -392,10 +392,9 @@ impl TraitRef { | |||
392 | ) -> Self { | 392 | ) -> Self { |
393 | let mut substs = TraitRef::substs_from_path(db, resolver, segment, resolved); | 393 | let mut substs = TraitRef::substs_from_path(db, resolver, segment, resolved); |
394 | if let Some(self_ty) = explicit_self_ty { | 394 | if let Some(self_ty) = explicit_self_ty { |
395 | // FIXME this could be nicer | 395 | crate::util::make_mut_arc_slice(&mut substs.0, |substs| { |
396 | let mut substs_vec = substs.0.to_vec(); | 396 | substs[0] = self_ty; |
397 | substs_vec[0] = self_ty; | 397 | }); |
398 | substs.0 = substs_vec.into(); | ||
399 | } | 398 | } |
400 | TraitRef { trait_: resolved, substs } | 399 | TraitRef { trait_: resolved, substs } |
401 | } | 400 | } |