mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Cleanup
This commit is contained in:
parent
417473aa3d
commit
37ff15ad83
2 changed files with 19 additions and 24 deletions
|
@ -462,7 +462,11 @@ impl<'a> InferenceContext<'a> {
|
|||
};
|
||||
match canonicalized.decanonicalize_ty(derefed_ty.value).kind(&Interner) {
|
||||
TyKind::Tuple(_, substs) => name.as_tuple_index().and_then(|idx| {
|
||||
substs.as_slice(&Interner).get(idx).map(|a| a.assert_ty_ref(&Interner)).cloned()
|
||||
substs
|
||||
.as_slice(&Interner)
|
||||
.get(idx)
|
||||
.map(|a| a.assert_ty_ref(&Interner))
|
||||
.cloned()
|
||||
}),
|
||||
TyKind::Adt(AdtId(hir_def::AdtId::StructId(s)), parameters) => {
|
||||
let local_id = self.db.struct_data(*s).variant_data.field(name)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue