- Load the project to vscode.
mkdir -p targetecho test > target/test.txtcargo run -p consumeroutputs the contents ofCargo.tomlandtarget/test.txt- Open main.rs
- Execute
rust-analyzer: Expand macro recursively at caretat line 4. Contents ofCargo.tomlis shown. - Move the cursor to line 5.
- Execute the same action.
Expected behavior: The expansion should contain:
// Recursive expansion of generate_include_str! macro
// ===================================================
let contents = "abc";
{
$crate::io::_print(builtin #format_args("{contents}"));
};
Actual behavior:
// Recursive expansion of generate_include_str! macro
// ===================================================
let contents = "";
{
$crate::io::_print(builtin #format_args("{contents}"));
};