mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Diagnose incorrect and private fields in record structs
This commit is contained in:
parent
55c75450fb
commit
8f5fee4a5a
10 changed files with 192 additions and 81 deletions
|
@ -166,8 +166,8 @@ impl<V, T> ProjectionElem<V, T> {
|
|||
TyKind::Adt(_, subst) => {
|
||||
db.field_types(f.parent)[f.local_id].clone().substitute(Interner, subst)
|
||||
}
|
||||
_ => {
|
||||
never!("Only adt has field");
|
||||
ty => {
|
||||
never!("Only adt has field, found {:?}", ty);
|
||||
return TyKind::Error.intern(Interner);
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue