From 66a2578064c2572a355f87f2405859a1c347b590 Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Mon, 22 Aug 2016 20:39:20 -0400 Subject: [PATCH] Mark panicking tests as `should_panic` instead of `no_run`. --- src/doc/book/macros.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc/book/macros.md b/src/doc/book/macros.md index 9f40829f4233f..78fe07ec1be16 100644 --- a/src/doc/book/macros.md +++ b/src/doc/book/macros.md @@ -662,7 +662,7 @@ Here are some common macros you’ll see in Rust code. This macro causes the current thread to panic. You can give it a message to panic with: -```rust,no_run +```rust,should_panic panic!("oh no!"); ``` @@ -688,7 +688,7 @@ These two macros are used in tests. `assert!` takes a boolean. `assert_eq!` takes two values and checks them for equality. `true` passes, `false` `panic!`s. Like this: -```rust,no_run +```rust,should_panic // A-ok! assert!(true);