Skip to content

Commit 7f74212

Browse files
committed
Rollup merge of rust-lang#25607 - peferron:doc-macros-assert-fix, r=steveklabnik
"Truth passes, success `panic!`s" seems to be a typo. The closest fix would be something like "Success passes, failure `panic!`s" but to me a "comparison failure" suggests that we couldn't compare the two values at all, not that we could successfully compare them and that the result was non-equality. So I opted to rewrite the paragraph a bit. If there's a better alternative please let me know. r? @steveklabnik
2 parents 1d961fd + afbe15d commit 7f74212

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/doc/trpl/macros.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -683,9 +683,9 @@ let v = vec![0; 100];
683683

684684
## assert! and assert_eq!
685685

686-
These two macros are used in tests. `assert!` takes a boolean, and `assert_eq!`
687-
takes two values and compares them. Truth passes, success `panic!`s. Like
688-
this:
686+
These two macros are used in tests. `assert!` takes a boolean. `assert_eq!`
687+
takes two values and checks them for equality. `true` passes, `false` `panic!`s.
688+
Like this:
689689

690690
```rust,no_run
691691
// A-ok!

0 commit comments

Comments
 (0)