Skip to content

Commit

Permalink
Add ui test of missing format argument in interpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Nov 3, 2021
1 parent 8546f4c commit 4974ce8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/ui/wrong-interpolation.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
use anyhow::{bail, Result};

fn main() -> Result<()> {
bail!("{} not found");
}
5 changes: 5 additions & 0 deletions tests/ui/wrong-interpolation.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
error: 1 positional argument in format string, but no arguments were given
--> tests/ui/wrong-interpolation.rs:4:12
|
4 | bail!("{} not found");
| ^^

0 comments on commit 4974ce8

Please sign in to comment.