In rust the in order to see the expansion of the macros like println! we can use the rust-expand crate
First install the crate
cargo install cargo-expand
then use cargo expand command
for eg: a hello world in rust will look like this
fn main() {
println!("Hello, world!");
}
with cargo expand it will look like
#![feature(prelude_import)]
#[prelude_import]
use std::prelude::rust_2018::*;
#[macro_use]
extern crate std;
fn main() {
{
::std::io::_print(::core::fmt::Arguments::new_v1(&["Hello, world!\n"], &[]));
};
}