From fd44a86866e0294a7c9845c37116082fa4073b52 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Fri, 6 Jan 2017 14:59:11 -0500 Subject: [PATCH] rational: test_recip_fail: Correct should_panic syntax Fixes this warning: warning: attribute must be of the form: `#[should_panic]` or `#[should_panic(expected = "error message")]` --> rational/src/lib.rs:1051:7 | 1051 | #[should_panic = "== 0"] | ^^^^^^^^^^^^^^^^^^^^^ | = note: Errors in this attribute were erroneously allowed and will become a hard error in a future release. Signed-off-by: Anders Kaseorg --- rational/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rational/src/lib.rs b/rational/src/lib.rs index 6ba54db..ce88516 100644 --- a/rational/src/lib.rs +++ b/rational/src/lib.rs @@ -1048,7 +1048,7 @@ mod test { } #[test] - #[should_panic = "== 0"] + #[should_panic(expected = "== 0")] fn test_recip_fail() { let _a = Ratio::new(0, 1).recip(); }