Skip to content

Commit fe4d1f9

Browse files
Fix quotes in output
1 parent 77e24f9 commit fe4d1f9

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

compiler/rustc_parse_format/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ impl<'a> Parser<'a> {
460460
} else {
461461
let pos = self.to_span_index(pos);
462462
let description = format!("expected `'}}'`, found `{maybe:?}`");
463-
let label = "expected `}`".to_owned();
463+
let label = "expected `'}'`".to_owned();
464464
let (note, secondary_label) = if c == '}' {
465465
(
466466
Some(

tests/ui/fmt/format-string-error-2.stderr

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ error: invalid format string: expected `'}'`, found `'a'`
1010
LL | format!("{
1111
| - because of this opening brace
1212
LL | a");
13-
| ^ expected `}` in format string
13+
| ^ expected `'}'` in format string
1414
|
1515
= note: if you intended to print `{`, you can escape it using `{{`
1616

@@ -21,15 +21,15 @@ LL | format!("{ \
2121
| - because of this opening brace
2222
LL | \
2323
LL | b");
24-
| ^ expected `}` in format string
24+
| ^ expected `'}'` in format string
2525
|
2626
= note: if you intended to print `{`, you can escape it using `{{`
2727

2828
error: invalid format string: expected `'}'`, found `'\'`
2929
--> $DIR/format-string-error-2.rs:11:18
3030
|
3131
LL | format!(r#"{ \
32-
| - ^ expected `}` in format string
32+
| - ^ expected `'}'` in format string
3333
| |
3434
| because of this opening brace
3535
|
@@ -39,7 +39,7 @@ error: invalid format string: expected `'}'`, found `'\'`
3939
--> $DIR/format-string-error-2.rs:15:18
4040
|
4141
LL | format!(r#"{ \n
42-
| - ^ expected `}` in format string
42+
| - ^ expected `'}'` in format string
4343
| |
4444
| because of this opening brace
4545
|
@@ -52,7 +52,7 @@ LL | format!("{ \n
5252
| - because of this opening brace
5353
LL | \n
5454
LL | e");
55-
| ^ expected `}` in format string
55+
| ^ expected `'}'` in format string
5656
|
5757
= note: if you intended to print `{`, you can escape it using `{{`
5858

@@ -62,7 +62,7 @@ error: invalid format string: expected `'}'`, found `'a'`
6262
LL | {
6363
| - because of this opening brace
6464
LL | a");
65-
| ^ expected `}` in format string
65+
| ^ expected `'}'` in format string
6666
|
6767
= note: if you intended to print `{`, you can escape it using `{{`
6868

@@ -72,7 +72,7 @@ error: invalid format string: expected `'}'`, found `'a'`
7272
LL | {
7373
| - because of this opening brace
7474
LL | a
75-
| ^ expected `}` in format string
75+
| ^ expected `'}'` in format string
7676
|
7777
= note: if you intended to print `{`, you can escape it using `{{`
7878

@@ -83,7 +83,7 @@ LL | { \
8383
| - because of this opening brace
8484
LL | \
8585
LL | b");
86-
| ^ expected `}` in format string
86+
| ^ expected `'}'` in format string
8787
|
8888
= note: if you intended to print `{`, you can escape it using `{{`
8989

@@ -94,15 +94,15 @@ LL | { \
9494
| - because of this opening brace
9595
LL | \
9696
LL | b \
97-
| ^ expected `}` in format string
97+
| ^ expected `'}'` in format string
9898
|
9999
= note: if you intended to print `{`, you can escape it using `{{`
100100

101101
error: invalid format string: expected `'}'`, found `'\'`
102102
--> $DIR/format-string-error-2.rs:45:8
103103
|
104104
LL | raw { \
105-
| - ^ expected `}` in format string
105+
| - ^ expected `'}'` in format string
106106
| |
107107
| because of this opening brace
108108
|
@@ -112,7 +112,7 @@ error: invalid format string: expected `'}'`, found `'\'`
112112
--> $DIR/format-string-error-2.rs:50:8
113113
|
114114
LL | raw { \n
115-
| - ^ expected `}` in format string
115+
| - ^ expected `'}'` in format string
116116
| |
117117
| because of this opening brace
118118
|
@@ -125,7 +125,7 @@ LL | { \n
125125
| - because of this opening brace
126126
LL | \n
127127
LL | e");
128-
| ^ expected `}` in format string
128+
| ^ expected `'}'` in format string
129129
|
130130
= note: if you intended to print `{`, you can escape it using `{{`
131131

@@ -135,7 +135,7 @@ error: invalid format string: expected `'}'`, found `'a'`
135135
LL | {
136136
| - because of this opening brace
137137
LL | asdf}
138-
| ^ expected `}` in format string
138+
| ^ expected `'}'` in format string
139139
|
140140
= note: if you intended to print `{`, you can escape it using `{{`
141141

tests/ui/fmt/format-string-error.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ error: invalid format string: expected `'}'`, found `'\'`
6262
--> $DIR/format-string-error.rs:19:23
6363
|
6464
LL | let _ = format!("{\}");
65-
| -^ expected `}` in format string
65+
| -^ expected `'}'` in format string
6666
| |
6767
| because of this opening brace
6868
|

tests/ui/fmt/format-string-wrong-order.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ error: invalid format string: expected `'}'`, found `'?'`
2626
--> $DIR/format-string-wrong-order.rs:9:15
2727
|
2828
LL | format!("{??}", bar);
29-
| -^ expected `}` in format string
29+
| -^ expected `'}'` in format string
3030
| |
3131
| because of this opening brace
3232
|
@@ -36,7 +36,7 @@ error: invalid format string: expected `'}'`, found `'?'`
3636
--> $DIR/format-string-wrong-order.rs:11:15
3737
|
3838
LL | format!("{?;bar}");
39-
| -^ expected `}` in format string
39+
| -^ expected `'}'` in format string
4040
| |
4141
| because of this opening brace
4242
|

tests/ui/fmt/ifmt-bad-arg.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ error: invalid format string: expected `'}'`, found `'t'`
178178
LL | ninth number: {
179179
| - because of this opening brace
180180
LL | tenth number: {}",
181-
| ^ expected `}` in format string
181+
| ^ expected `'}'` in format string
182182
|
183183
= note: if you intended to print `{`, you can escape it using `{{`
184184

0 commit comments

Comments
 (0)