diff options
| author | bors <bors@rust-lang.org> | 2024-10-15 11:50:31 +0000 | 
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-10-15 11:50:31 +0000 | 
| commit | f79fae3069c449993eda6b16934da3b144cb8a66 (patch) | |
| tree | 5d40dfbe3306ad9eb29cd79418eec5e03019ef8d /compiler/rustc_parse_format/src/lib.rs | |
| parent | 00367d523e3dbc7bc7c7a5f5772c2928453fdbc6 (diff) | |
| parent | c99c4d4057dd90ff517ed803d3956ed8ce4de7d1 (diff) | |
| download | rust-f79fae3069c449993eda6b16934da3b144cb8a66.tar.gz rust-f79fae3069c449993eda6b16934da3b144cb8a66.zip | |
Auto merge of #131723 - matthiaskrgr:rollup-krcslig, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - #122670 (Fix bug where `option_env!` would return `None` when env var is present but not valid Unicode) - #131095 (Use environment variables instead of command line arguments for merged doctests) - #131339 (Expand set_ptr_value / with_metadata_of docs) - #131652 (Move polarity into `PolyTraitRef` rather than storing it on the side) - #131675 (Update lint message for ABI not supported) - #131681 (Fix up-to-date checking for run-make tests) - #131702 (Suppress import errors for traits that couldve applied for method lookup error) - #131703 (Resolved python deprecation warning in publish_toolstate.py) - #131710 (Remove `'apostrophes'` from `rustc_parse_format`) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse_format/src/lib.rs')
| -rw-r--r-- | compiler/rustc_parse_format/src/lib.rs | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/compiler/rustc_parse_format/src/lib.rs b/compiler/rustc_parse_format/src/lib.rs index e7ef4385baf..1716f417969 100644 --- a/compiler/rustc_parse_format/src/lib.rs +++ b/compiler/rustc_parse_format/src/lib.rs @@ -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 { | 
