rust/compiler
bors edadc7ccdd Auto merge of #102519 - Alexendoo:format-args-macro-str, r=m-ou-se
Fix `format_args` capture for macro expanded format strings

Since #100996 `format_args` capture for macro expanded strings aren't prevented when the span of the expansion points to a string literal, e.g.

```rust
// not a terribly realistic example, but also happens for proc_macros that set
// the span of the output to an input str literal, such as indoc
macro_rules! x {
    ($e:expr) => { $e }
}

fn main() {
    let a = 1;
    println!(x!("{a}"));
}
```

The tests didn't catch it as the span of `concat!()` points to the macro invocation

r? `@m-ou-se`
2022-10-01 14:15:29 +00:00
..
2022-10-01 10:03:06 +00:00
2022-09-29 08:44:52 +10:00
2022-09-29 08:44:52 +10:00
2022-09-30 21:02:53 +02:00
2022-10-01 10:03:06 +00:00
2022-09-29 08:44:52 +10:00
2022-09-29 08:44:52 +10:00