]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #92460 - dwrensha:fix-92267, r=petrochenkov
authorMatthias Krüger <matthias.krueger@famsik.de>
Sat, 1 Jan 2022 09:48:57 +0000 (10:48 +0100)
committerGitHub <noreply@github.com>
Sat, 1 Jan 2022 09:48:57 +0000 (10:48 +0100)
[rustc_builtin_macros] add indices to format_foreign::printf::Substitution::Escape

Fixes #92267.

The problem was that the escape string "%%" does not need to appear at the very beginning of the format string, but
the iterator implementation assumed that it did.

The solution follows the pattern used by `format_foregin::shell::Subtitution::Escape`: https://github.com/rust-lang/rust/blob/8ed935e92dfb09ae388344b12284bf5110cf9265/compiler/rustc_builtin_macros/src/format_foreign.rs#L629


Trivial merge