- Load the project to vscode.
mkdir -p target
echo test > target/test.txt
cargo run -p consumer
outputs the contents ofCargo.toml
andtarget/test.txt
- Open main.rs
- Execute
rust-analyzer: Expand macro recursively at caret
at line 4. Contents ofCargo.toml
is 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}"));
};