rust/compiler/rustc_span
bors 0c0b403f19 Auto merge of #106195 - Nilstrieb:no-more-being-clueless-whether-it-really-is-a-literal, r=compiler-errors
Improve heuristics whether `format_args` string is a source literal

Previously, it only checked whether there was _a_ literal at the span of the first argument, not whether the literal actually matched up. This caused issues when a proc macro was generating a different literal with the same span.

This requires an annoying special case for literals ending in `\n` because otherwise `println` wouldn't give detailed diagnostics anymore which would be bad.

Fixes #106191
2022-12-29 11:20:50 +00:00
..
src Auto merge of #106195 - Nilstrieb:no-more-being-clueless-whether-it-really-is-a-literal, r=compiler-errors 2022-12-29 11:20:50 +00:00
Cargo.toml Bump cfg-if to 1.0 2022-12-20 13:03:45 +00:00