]> git.lizzy.rs Git - rust.git/commitdiff
Mark panicking tests as `should_panic` instead of `no_run`.
authorCorey Farwell <coreyf@rwell.org>
Tue, 23 Aug 2016 00:39:20 +0000 (20:39 -0400)
committerCorey Farwell <coreyf@rwell.org>
Tue, 23 Aug 2016 00:39:20 +0000 (20:39 -0400)
src/doc/book/macros.md

index 9f40829f4233f1e4d76f37f5f39fcc4850eaeb28..78fe07ec1be165acc58a0e5d3fd0afb999d6b6b1 100644 (file)
@@ -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);