Skip to content

Commit e3e4390

Browse files
Rollup merge of rust-lang#35913 - frewsxcv:panic, r=steveklabnik
Mark panicking tests as `should_panic` instead of `no_run`. None
2 parents 21d4ec9 + 66a2578 commit e3e4390

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/doc/book/macros.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ Here are some common macros you’ll see in Rust code.
662662
This macro causes the current thread to panic. You can give it a message
663663
to panic with:
664664

665-
```rust,no_run
665+
```rust,should_panic
666666
panic!("oh no!");
667667
```
668668

@@ -688,7 +688,7 @@ These two macros are used in tests. `assert!` takes a boolean. `assert_eq!`
688688
takes two values and checks them for equality. `true` passes, `false` `panic!`s.
689689
Like this:
690690

691-
```rust,no_run
691+
```rust,should_panic
692692
// A-ok!
693693
694694
assert!(true);

0 commit comments

Comments
 (0)