diff options
| author | bors <bors@rust-lang.org> | 2022-10-01 14:15:29 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-10-01 14:15:29 +0000 |
| commit | edadc7ccdda644ef8149869d2f24018a1dac202a (patch) | |
| tree | f8f2788724ae71262ba2c85c6c1625dc3f0cfa36 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 744e397d8855f7da87d70aa8d0bd9e0f5f0b51a1 (diff) | |
| parent | 71db0dd918424accf32104d8b780079105a7ac30 (diff) | |
| download | rust-edadc7ccdda644ef8149869d2f24018a1dac202a.tar.gz rust-edadc7ccdda644ef8149869d2f24018a1dac202a.zip | |
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`
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
