mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
import make_mut_arc_slice
This commit is contained in:
parent
965ca0d271
commit
b462eb96b8
1 changed files with 2 additions and 1 deletions
|
@ -22,6 +22,7 @@ use crate::{
|
||||||
resolve::{Resolver, TypeNs},
|
resolve::{Resolver, TypeNs},
|
||||||
ty::Adt,
|
ty::Adt,
|
||||||
type_ref::{TypeBound, TypeRef},
|
type_ref::{TypeBound, TypeRef},
|
||||||
|
util::make_mut_arc_slice,
|
||||||
BuiltinType, Const, Enum, EnumVariant, Function, ModuleDef, Path, Static, Struct, StructField,
|
BuiltinType, Const, Enum, EnumVariant, Function, ModuleDef, Path, Static, Struct, StructField,
|
||||||
Trait, TypeAlias, Union,
|
Trait, TypeAlias, Union,
|
||||||
};
|
};
|
||||||
|
@ -390,7 +391,7 @@ impl TraitRef {
|
||||||
) -> Self {
|
) -> Self {
|
||||||
let mut substs = TraitRef::substs_from_path(db, resolver, segment, resolved);
|
let mut substs = TraitRef::substs_from_path(db, resolver, segment, resolved);
|
||||||
if let Some(self_ty) = explicit_self_ty {
|
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;
|
substs[0] = self_ty;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue