|
| 1 | +error: invalid format string: expected `}`, found `x` |
| 2 | + --> $DIR/sugg-field-in-format-string-issue-141136.rs:9:28 |
| 3 | + | |
| 4 | +LL | let _ = format!("{ x}"); |
| 5 | + | - ^ expected `}` in format string |
| 6 | + | | |
| 7 | + | because of this opening brace |
| 8 | + | |
| 9 | + = note: if you intended to print `{`, you can escape it using `{{` |
| 10 | + |
| 11 | +error[E0425]: cannot find value `x` in this scope |
| 12 | + --> $DIR/sugg-field-in-format-string-issue-141136.rs:7:27 |
| 13 | + | |
| 14 | +LL | let _ = format!("{x}"); |
| 15 | + | ^ |
| 16 | + | |
| 17 | +help: you might have meant to use the available field |
| 18 | + | |
| 19 | +LL | let _ = format!("{self.x}"); |
| 20 | + | +++++ |
| 21 | + |
| 22 | +error[E0425]: cannot find value `x` in this scope |
| 23 | + --> $DIR/sugg-field-in-format-string-issue-141136.rs:8:27 |
| 24 | + | |
| 25 | +LL | let _ = format!("{x }"); |
| 26 | + | ^^ |
| 27 | + | |
| 28 | +help: you might have meant to use the available field |
| 29 | + | |
| 30 | +LL | let _ = format!("{self.x }"); |
| 31 | + | +++++ |
| 32 | + |
| 33 | +error[E0425]: cannot find value `x` in this scope |
| 34 | + --> $DIR/sugg-field-in-format-string-issue-141136.rs:10:31 |
| 35 | + | |
| 36 | +LL | let _ = format!("{}", x); |
| 37 | + | ^ |
| 38 | + | |
| 39 | +help: you might have meant to use the available field |
| 40 | + | |
| 41 | +LL | let _ = format!("{}", self.x); |
| 42 | + | +++++ |
| 43 | + |
| 44 | +error: aborting due to 4 previous errors |
| 45 | + |
| 46 | +For more information about this error, try `rustc --explain E0425`. |
0 commit comments