Fix quotes in output

This commit is contained in:
Michael Goulet 2023-07-17 00:32:13 +00:00
parent 77e24f90f5
commit fe4d1f9fe9
5 changed files with 18 additions and 18 deletions

View file

@ -460,7 +460,7 @@ impl<'a> Parser<'a> {
} else { } else {
let pos = self.to_span_index(pos); let pos = self.to_span_index(pos);
let description = format!("expected `'}}'`, found `{maybe:?}`"); let description = format!("expected `'}}'`, found `{maybe:?}`");
let label = "expected `}`".to_owned(); let label = "expected `'}'`".to_owned();
let (note, secondary_label) = if c == '}' { let (note, secondary_label) = if c == '}' {
( (
Some( Some(

View file

@ -10,7 +10,7 @@ error: invalid format string: expected `'}'`, found `'a'`
LL | format!("{ LL | format!("{
| - because of this opening brace | - because of this opening brace
LL | a"); LL | a");
| ^ expected `}` in format string | ^ expected `'}'` in format string
| |
= note: if you intended to print `{`, you can escape it using `{{` = note: if you intended to print `{`, you can escape it using `{{`
@ -21,7 +21,7 @@ LL | format!("{ \
| - because of this opening brace | - because of this opening brace
LL | \ LL | \
LL | b"); LL | b");
| ^ expected `}` in format string | ^ expected `'}'` in format string
| |
= note: if you intended to print `{`, you can escape it using `{{` = note: if you intended to print `{`, you can escape it using `{{`
@ -29,7 +29,7 @@ error: invalid format string: expected `'}'`, found `'\'`
--> $DIR/format-string-error-2.rs:11:18 --> $DIR/format-string-error-2.rs:11:18
| |
LL | format!(r#"{ \ LL | format!(r#"{ \
| - ^ expected `}` in format string | - ^ expected `'}'` in format string
| | | |
| because of this opening brace | because of this opening brace
| |
@ -39,7 +39,7 @@ error: invalid format string: expected `'}'`, found `'\'`
--> $DIR/format-string-error-2.rs:15:18 --> $DIR/format-string-error-2.rs:15:18
| |
LL | format!(r#"{ \n LL | format!(r#"{ \n
| - ^ expected `}` in format string | - ^ expected `'}'` in format string
| | | |
| because of this opening brace | because of this opening brace
| |
@ -52,7 +52,7 @@ LL | format!("{ \n
| - because of this opening brace | - because of this opening brace
LL | \n LL | \n
LL | e"); LL | e");
| ^ expected `}` in format string | ^ expected `'}'` in format string
| |
= note: if you intended to print `{`, you can escape it using `{{` = note: if you intended to print `{`, you can escape it using `{{`
@ -62,7 +62,7 @@ error: invalid format string: expected `'}'`, found `'a'`
LL | { LL | {
| - because of this opening brace | - because of this opening brace
LL | a"); LL | a");
| ^ expected `}` in format string | ^ expected `'}'` in format string
| |
= note: if you intended to print `{`, you can escape it using `{{` = note: if you intended to print `{`, you can escape it using `{{`
@ -72,7 +72,7 @@ error: invalid format string: expected `'}'`, found `'a'`
LL | { LL | {
| - because of this opening brace | - because of this opening brace
LL | a LL | a
| ^ expected `}` in format string | ^ expected `'}'` in format string
| |
= note: if you intended to print `{`, you can escape it using `{{` = note: if you intended to print `{`, you can escape it using `{{`
@ -83,7 +83,7 @@ LL | { \
| - because of this opening brace | - because of this opening brace
LL | \ LL | \
LL | b"); LL | b");
| ^ expected `}` in format string | ^ expected `'}'` in format string
| |
= note: if you intended to print `{`, you can escape it using `{{` = note: if you intended to print `{`, you can escape it using `{{`
@ -94,7 +94,7 @@ LL | { \
| - because of this opening brace | - because of this opening brace
LL | \ LL | \
LL | b \ LL | b \
| ^ expected `}` in format string | ^ expected `'}'` in format string
| |
= note: if you intended to print `{`, you can escape it using `{{` = note: if you intended to print `{`, you can escape it using `{{`
@ -102,7 +102,7 @@ error: invalid format string: expected `'}'`, found `'\'`
--> $DIR/format-string-error-2.rs:45:8 --> $DIR/format-string-error-2.rs:45:8
| |
LL | raw { \ LL | raw { \
| - ^ expected `}` in format string | - ^ expected `'}'` in format string
| | | |
| because of this opening brace | because of this opening brace
| |
@ -112,7 +112,7 @@ error: invalid format string: expected `'}'`, found `'\'`
--> $DIR/format-string-error-2.rs:50:8 --> $DIR/format-string-error-2.rs:50:8
| |
LL | raw { \n LL | raw { \n
| - ^ expected `}` in format string | - ^ expected `'}'` in format string
| | | |
| because of this opening brace | because of this opening brace
| |
@ -125,7 +125,7 @@ LL | { \n
| - because of this opening brace | - because of this opening brace
LL | \n LL | \n
LL | e"); LL | e");
| ^ expected `}` in format string | ^ expected `'}'` in format string
| |
= note: if you intended to print `{`, you can escape it using `{{` = note: if you intended to print `{`, you can escape it using `{{`
@ -135,7 +135,7 @@ error: invalid format string: expected `'}'`, found `'a'`
LL | { LL | {
| - because of this opening brace | - because of this opening brace
LL | asdf} LL | asdf}
| ^ expected `}` in format string | ^ expected `'}'` in format string
| |
= note: if you intended to print `{`, you can escape it using `{{` = note: if you intended to print `{`, you can escape it using `{{`

View file

@ -62,7 +62,7 @@ error: invalid format string: expected `'}'`, found `'\'`
--> $DIR/format-string-error.rs:19:23 --> $DIR/format-string-error.rs:19:23
| |
LL | let _ = format!("{\}"); LL | let _ = format!("{\}");
| -^ expected `}` in format string | -^ expected `'}'` in format string
| | | |
| because of this opening brace | because of this opening brace
| |

View file

@ -26,7 +26,7 @@ error: invalid format string: expected `'}'`, found `'?'`
--> $DIR/format-string-wrong-order.rs:9:15 --> $DIR/format-string-wrong-order.rs:9:15
| |
LL | format!("{??}", bar); LL | format!("{??}", bar);
| -^ expected `}` in format string | -^ expected `'}'` in format string
| | | |
| because of this opening brace | because of this opening brace
| |
@ -36,7 +36,7 @@ error: invalid format string: expected `'}'`, found `'?'`
--> $DIR/format-string-wrong-order.rs:11:15 --> $DIR/format-string-wrong-order.rs:11:15
| |
LL | format!("{?;bar}"); LL | format!("{?;bar}");
| -^ expected `}` in format string | -^ expected `'}'` in format string
| | | |
| because of this opening brace | because of this opening brace
| |

View file

@ -178,7 +178,7 @@ error: invalid format string: expected `'}'`, found `'t'`
LL | ninth number: { LL | ninth number: {
| - because of this opening brace | - because of this opening brace
LL | tenth number: {}", LL | tenth number: {}",
| ^ expected `}` in format string | ^ expected `'}'` in format string
| |
= note: if you intended to print `{`, you can escape it using `{{` = note: if you intended to print `{`, you can escape it using `{{`