chalk
chalk copied to clipboard
Add callback to get layout data
To perform some of wf checks, we need access to type layout data. For now we need two things: alignment and whether or not a type is a ZST. Note that computing layout needs access to the environment, so the callback will need to accept it as a parameter.
Which wf checks? Rust-analyzer doesn't calculate the layout of types and I don't think it will anytime soon.
@bjorn3 DispatchFromDyn
impl wf checks, link
Rust-analyzer doesn't do any WF checking either though, so we can probably get away with a stub implementation of these callbacks.
@rustbot claim
I still need to understand what needs to be done as part of this issue and if anybody has already done anything like this somewhere else. If anybody wants to give hints in that regard, I welcome them.
My first hunch would be that this method needs to be added to the WfSolver
based on the other methods that are there.
Is that correct?
@vringar if you're no longer working on this, can I give it a go?
Go ahead!