You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Local struct - def::DefTy, struct from some other crate - def::DefStruct
Local struct constructor - def::DefStruct, struct constructor from some other crate - def::DefFn
Is there any rationale for these discrepancies?
I made some quick experiment and fixed the first discrepancy by using DefStruct in both cases. It resulted in better error diagnostics and one discovered bug. Seems like a win.
I'd also like to split DefTy(DefId, bool /* is_enum */) into DefEnum(DefId) and DefTypeAlias(DefId). I have and impression that type aliases may be not always treated correctly, or at least consciously.