5 ms·
The self-modifying code mentioned in the Macros section could be automated in an IDE! That is, your IDE should be able to show you the expansion of a macro at t
by krab 3y ago
The self-modifying code mentioned in the Macros section could be automated in an IDE! That is, your IDE should be able to show you the expansion of a macro at that specific place. This feature would help me much more to understand what's going on than navigation to the macro source.
I'm not sure if there are any IDEs supporting (temporary) macro expansion already. The output showing all macros expanded is usually too verbose.
- josephg 3y agoRustrover (IntelliJ) can do some of this. You can use quick actions to expand a macro inline in the IDE.
- Tmpod 3y agoAs can rust-analyzer, btw. It's very useful sometimes.
- chrisshroba 3y agoHow would you interface with rust-analyzer to make it do this? As I understand it rust analyzer acts like an LSP to your IDE, which in turn doesn’t let you just make raw calls to rust analyzer
- diarrhea 3y agoIn VSCode it’s just a command away (on the command palette).
- Vingdoloras 3y agoIn addition to the already mentioned Command Palette, macro expansion is also available as a quick fix, either by clicking the light bulb icon when it appears, or triggering it via hotkey (Ctrl+. by default).
- t_mahmood 3y agoIntellij can also expand macro inline, But iirc you have to enable it in advanced settings.
- deleted 3y ago[deleted]
- ollysb 3y agoFor that matter it would be nice to expand any function call in place. That way you could view a full call stack in a single view.