Skip to content

Commit

Permalink
Merge pull request #181 from dtolnay/fmt
Browse files Browse the repository at this point in the history
Add ui test of missing format argument in interpolation
  • Loading branch information
dtolnay authored Nov 3, 2021
2 parents 8546f4c + 4974ce8 commit 7671d91
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 7671d91

Please sign in to comment.