diff options
Diffstat (limited to 'third_party/rust/anyhow/tests/ui/must-use.rs')
-rw-r--r-- | third_party/rust/anyhow/tests/ui/must-use.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/third_party/rust/anyhow/tests/ui/must-use.rs b/third_party/rust/anyhow/tests/ui/must-use.rs new file mode 100644 index 0000000000..ea4e58f55e --- /dev/null +++ b/third_party/rust/anyhow/tests/ui/must-use.rs @@ -0,0 +1,11 @@ +#![deny(unused_must_use)] + +use anyhow::anyhow; + +fn main() -> anyhow::Result<()> { + if true { + // meant to write bail! + anyhow!("it failed"); + } + Ok(()) +} |