charon icon indicating copy to clipboard operation
charon copied to clipboard

Retrieve the result of drop elaboration

Open sonmarcho opened this issue 1 year ago • 4 comments

sonmarcho avatar Apr 26 '24 09:04 sonmarcho

For context:

  • Drop elaboration is well explained in the dev guide;
  • It is run in the analysis->runtime MIR phase, the results of which are available only in mir_drops_elaborated_and_const_checked and optimized_mir;
  • We can't run individual passes ourselves because they're not made public (but we could ask rustc devs for that). EDIT: see below.

Nadrieril avatar Apr 27 '24 11:04 Nadrieril

I discovered the -Z mir-enable-passes=val flag, which allows choosing exactly which mir passes to run! I'll have to experiment to see if we can get drops without other optimizations.

Nadrieril avatar May 08 '24 14:05 Nadrieril

I discovered the -Z mir-enable-passes=val flag, which allows choosing exactly which mir passes to run! I'll have to experiment to see if we can get drops without other optimizations.

This looks very promising!

sonmarcho avatar May 13 '24 10:05 sonmarcho