Add test for raw string
This commit is contained in:
parent
c55a698943
commit
bde2be0b1c
2 changed files with 14 additions and 1 deletions
|
|
@ -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`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue