Search code examples
rustrust-macros

Is there a way to view expanded macros on non-nightly Rust?


I realise this has been asked before and the answer was to use the -Z option with rustc, but that only works with the nightly build of Rust as of Rust 1.31.

Is there an alternative when using the stable build?


Solution

  • No, there is not. This is only available on nightly Rust.

    When using rustup, however, there's no reason to not have both stable and nightly Rust installed. You can then just do rustc +nightly -Z ..., continuing to compile your code with stable.

    See also: