Open alice-i-cecile opened 1 month ago
Looks like this can be done with approx_ty_size()
, though LayoutOff
looks promising as well. LayoutCalculator
and Abi
seem like even better tells for ZSTs, but they might be more difficult to use.
I think this is a good idea! What specific types am I looking for? Anything before Ref
and Mut
?
Any of the methods on ComponentTicks being called on a ZST, Ref<ZST>
, ChangeTrackers<ZST>
or Changed<ZST>
. This is probably a Suspicious category lint: it technically works but...
Yeah, I'd say the only place where you want to do this is macros, and there it's commonplace to disable lints already.
You can technically call .is_changed or use Changed on components and resources with no data. This is cursed, and likely to be removed eventually.