rust-reduce icon indicating copy to clipboard operation
rust-reduce copied to clipboard

Show error when initial invocation after module inlining doesn't reproduce the bug

Open bjorn3 opened this issue 5 years ago • 2 comments

I had an include_str inside a module, so after module inlining the path had to be adjusted.

bjorn3 avatar Jun 21 '20 10:06 bjorn3

Could you provide an example input that exhibits the issue?

jethrogb avatar Jun 21 '20 13:06 jethrogb

https://github.com/anp/criterion.rs/tree/9e2a54710b0afcaee98991376ac9abb164bfadaa

Basically

//- src/html/report.html
<p>some html</p>
//- src/html/mod.rs
fn a() {
    let b = include_str!("report.html");
}
//- src/lib.rs
mod html;

got turned into

mod html {
fn a() {
    let b = include_str!("report.html");
}
}

The path to report.html needs to be adjusted.

bjorn3 avatar Jun 21 '20 13:06 bjorn3