From 34ab0dc2cdfe982cd0b6eca330583b41f5f55448 Mon Sep 17 00:00:00 2001 From: edef Date: Sat, 25 Feb 2017 14:24:36 +0100 Subject: [PATCH] Fix should_panic attributes --- src/arch/mod.rs | 4 ++-- tests/stack.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/arch/mod.rs b/src/arch/mod.rs index 67ae97d..1ed3aee 100644 --- a/src/arch/mod.rs +++ b/src/arch/mod.rs @@ -81,7 +81,7 @@ mod tests { } #[test] - #[should_panic="arg=0"] + #[should_panic(expected = "arg=0")] fn panic_after_start() { unsafe { let stack = OsStack::new(4 << 20).unwrap(); @@ -92,7 +92,7 @@ mod tests { } #[test] - #[should_panic="arg=1"] + #[should_panic(expected = "arg=1")] fn panic_after_swap() { unsafe { let stack = OsStack::new(4 << 20).unwrap(); diff --git a/tests/stack.rs b/tests/stack.rs index f8ad4d4..0956ffe 100644 --- a/tests/stack.rs +++ b/tests/stack.rs @@ -48,7 +48,7 @@ fn slice_too_small() { } #[test] -#[should_panic="SliceStack too small"] +#[should_panic(expected = "SliceStack too small")] fn slice_too_small_unaligned() { unsafe { let ptr = heap::allocate(STACK_ALIGNMENT, STACK_ALIGNMENT);