about summary refs log tree commit diff
path: root/src/test/ui/fmt/format-string-error.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-12-27 02:00:17 +0000
committerbors <bors@rust-lang.org>2018-12-27 02:00:17 +0000
commita1bad57fa59a8069a6ebb05cd6a2ae73c88b2e98 (patch)
tree195a049e23a0286c17cb5cf312abc740c7dca161 /src/test/ui/fmt/format-string-error.rs
parent79bbce488e115f9a553e932832991a14b7bfe20f (diff)
parent862ebc4c38958b8ba5e30dd5eb1203e6109c40a2 (diff)
downloadrust-a1bad57fa59a8069a6ebb05cd6a2ae73c88b2e98.tar.gz
rust-a1bad57fa59a8069a6ebb05cd6a2ae73c88b2e98.zip
Auto merge of #57069 - estebank:str-err, r=@cramertj
Various changes to string format diagnostics

- Point at opening mismatched formatting brace
- Account for differences between raw and regular strings
- Account for differences between the code snippet and `InternedString`
- Add more tests

```
error: invalid format string: expected `'}'`, found `'t'`
  --> $DIR/ifmt-bad-arg.rs:85:1
   |
LL | ninth number: {
   |               - because of this opening brace
LL | tenth number: {}",
   | ^ expected `}` in format string
   |
   = note: if you intended to print `{`, you can escape it using `{{`
```

Fix #53837.
Diffstat (limited to 'src/test/ui/fmt/format-string-error.rs')
-rw-r--r--src/test/ui/fmt/format-string-error.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/ui/fmt/format-string-error.rs b/src/test/ui/fmt/format-string-error.rs
index 6d2837e35b7..cca949aab63 100644
--- a/src/test/ui/fmt/format-string-error.rs
+++ b/src/test/ui/fmt/format-string-error.rs
@@ -31,7 +31,7 @@ fn main() {
 	{
 
 "###);
-    //~^^ ERROR invalid format string
+    //~^ ERROR invalid format string
     let _ = format!(r###"