Modifying AST, creating new DefIds

Hi all, I am working on a project that requires me to wrap some function calls. I tried writing an MIR pass, but was caught by the fact that I am wrapping my function calls with a closure and closures need DefIds. So I decided to modify AST, but I might be doing it wrong. My new closures mess up the crate and it can't be typechecked. I have opened an issue here Modifying AST · Issue #1837 · rust-lang/rustc-dev-guide · GitHub for help, but I figured there are possibly more active compiler devs here. Any help would be very much appreciated.

Thanks a lot in advance.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.