chalk icon indicating copy to clipboard operation
chalk copied to clipboard

Add callback to get layout data

Open basil-cow opened this issue 4 years ago • 7 comments

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.

basil-cow avatar Jun 11 '20 20:06 basil-cow

Which wf checks? Rust-analyzer doesn't calculate the layout of types and I don't think it will anytime soon.

bjorn3 avatar Jun 12 '20 08:06 bjorn3

@bjorn3 DispatchFromDyn impl wf checks, link

basil-cow avatar Jun 12 '20 09:06 basil-cow

Rust-analyzer doesn't do any WF checking either though, so we can probably get away with a stub implementation of these callbacks.

flodiebold avatar Jun 12 '20 10:06 flodiebold

@rustbot claim

Updated permalink

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.

vringar avatar Sep 21 '21 13:09 vringar

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 avatar Sep 21 '21 16:09 vringar

@vringar if you're no longer working on this, can I give it a go?

JakobDegen avatar Oct 31 '21 19:10 JakobDegen

Go ahead!

vringar avatar Nov 02 '21 09:11 vringar