mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Fix data layout of reference to nested unsized structs
This commit is contained in:
parent
f53f9230f0
commit
302bb3c871
3 changed files with 53 additions and 1 deletions
|
@ -315,7 +315,10 @@ fn struct_tail_erasing_lifetimes(db: &dyn HirDatabase, pointee: Ty) -> Ty {
|
|||
let data = db.struct_data(*i);
|
||||
let mut it = data.variant_data.fields().iter().rev();
|
||||
match it.next() {
|
||||
Some((f, _)) => field_ty(db, (*i).into(), f, subst),
|
||||
Some((f, _)) => {
|
||||
let last_field_ty = field_ty(db, (*i).into(), f, subst);
|
||||
struct_tail_erasing_lifetimes(db, last_field_ty)
|
||||
}
|
||||
None => pointee,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue