import make_mut_arc_slice

This commit is contained in:
Shotaro Yamada 2019-10-14 17:21:38 +09:00
parent 965ca0d271
commit b462eb96b8

View file

@ -22,6 +22,7 @@ use crate::{
resolve::{Resolver, TypeNs},
ty::Adt,
type_ref::{TypeBound, TypeRef},
util::make_mut_arc_slice,
BuiltinType, Const, Enum, EnumVariant, Function, ModuleDef, Path, Static, Struct, StructField,
Trait, TypeAlias, Union,
};
@ -390,7 +391,7 @@ impl TraitRef {
) -> Self {
let mut substs = TraitRef::substs_from_path(db, resolver, segment, resolved);
if let Some(self_ty) = explicit_self_ty {
crate::util::make_mut_arc_slice(&mut substs.0, |substs| {
make_mut_arc_slice(&mut substs.0, |substs| {
substs[0] = self_ty;
});
}