This commit is contained in:
nora 2025-10-17 22:25:39 +02:00
parent 93553d8aae
commit e9b6576d2b
3 changed files with 17 additions and 2 deletions

15
README.md Normal file
View file

@ -0,0 +1,15 @@
# reproduction
To reproduce the issue, run `./repro.sh`.
This will clean the build, and then toggle two lines between
```
// 1
// 2
```
```
// 1
```
which is enough to trigger the issue.
**Make sure to `export RUSTFLAGS=-Zincremental-verify-ich` first, otherwise it may not reproduce**.

View file

@ -53,7 +53,7 @@ pub async fn bar_baz() {
}
// 1
// 2
// 2
#[derive(proc_macro_thing::MyMacro)]
#[helper]

View file

@ -7,7 +7,7 @@ const one = c.findIndex(l => l.includes("// 1"));
if (c[one + 1].includes("// 2")) {
c.splice(one + 1, 1);
} else {
c.splice(one + 1, 0, " // 2")
c.splice(one + 1, 0, "// 2")
}
fs.writeFileSync("src/main.rs", c.join("\n"));