Remove 'apostrophes' from rustc_parse_format

This commit is contained in:
Lieselotte 2024-10-14 23:22:51 +02:00
parent 9322d183f4
commit dda3066805
No known key found for this signature in database
GPG key ID: 68A9A951C7E1F283
21 changed files with 83 additions and 83 deletions

View file

@ -473,19 +473,19 @@ impl<'a> Parser<'a> {
}
pos = peek_pos;
description = format!("expected `'}}'`, found `{maybe:?}`");
description = format!("expected `}}`, found `{}`", maybe.escape_debug());
} else {
description = "expected `'}'` but string was terminated".to_owned();
description = "expected `}` but string was terminated".to_owned();
// point at closing `"`
pos = self.input.len() - if self.append_newline { 1 } else { 0 };
}
let pos = self.to_span_index(pos);
let label = "expected `'}'`".to_owned();
let label = "expected `}`".to_owned();
let (note, secondary_label) = if arg.format.fill == Some('}') {
(
Some("the character `'}'` is interpreted as a fill character because of the `:` that precedes it".to_owned()),
Some("the character `}` is interpreted as a fill character because of the `:` that precedes it".to_owned()),
arg.format.fill_span.map(|sp| ("this is not interpreted as a formatting closing brace".to_owned(), sp)),
)
} else {