diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2018-07-23 15:43:34 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2018-07-23 16:03:26 -0700 |
| commit | bde2be0b1c91489bc590650613fac63854568176 (patch) | |
| tree | 65bd70afdfe46b8fe012dbc3d29a3679395870dc /src | |
| parent | c55a698943c515c8028522360e42b12bbf4fb274 (diff) | |
Add test for raw string
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/ifmt-bad-arg.rs | 7 | ||||
| -rw-r--r-- | src/test/ui/ifmt-bad-arg.stderr | 8 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/test/ui/ifmt-bad-arg.rs b/src/test/ui/ifmt-bad-arg.rs index afe9bc152a3..bbd75f30d6c 100644 --- a/src/test/ui/ifmt-bad-arg.rs +++ b/src/test/ui/ifmt-bad-arg.rs @@ -64,4 +64,11 @@ fn main() { format!("foo }"); //~ ERROR: unmatched `}` found format!("foo %s baz", "bar"); //~ ERROR: argument never used + + format!(r##" + + {foo} + + "##); + //~^^^ ERROR: there is no argument named `foo` } diff --git a/src/test/ui/ifmt-bad-arg.stderr b/src/test/ui/ifmt-bad-arg.stderr index 4f5f37132e8..b02aa765d09 100644 --- a/src/test/ui/ifmt-bad-arg.stderr +++ b/src/test/ui/ifmt-bad-arg.stderr @@ -183,5 +183,11 @@ LL | format!("foo %s baz", "bar"); //~ ERROR: argument never used = help: `%s` should be written as `{}` = note: printf formatting not supported; see the documentation for `std::fmt` -error: aborting due to 26 previous errors +error: there is no argument named `foo` + --> $DIR/ifmt-bad-arg.rs:70:9 + | +LL | {foo} + | ^^^^^ + +error: aborting due to 27 previous errors |
