mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Merge commit '3b7c7f97e4
' into sync-from-ra
This commit is contained in:
parent
6eaf3f8bb2
commit
d1d111d09e
177 changed files with 14930 additions and 2099 deletions
|
@ -402,10 +402,9 @@ pub(super) fn definition(
|
|||
|&it| it.layout(db),
|
||||
|_| {
|
||||
let var_def = it.parent_def(db);
|
||||
let id = it.index();
|
||||
match var_def {
|
||||
hir::VariantDef::Struct(s) => {
|
||||
Adt::from(s).layout(db).ok().and_then(|layout| layout.field_offset(id))
|
||||
Adt::from(s).layout(db).ok().and_then(|layout| layout.field_offset(it))
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue