Skip to content

Commit a1c831b

Browse files
committed
manual: avoid describing 'assert' as 'like check', note future removal.
1 parent 73d4417 commit a1c831b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

doc/rust.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2404,11 +2404,10 @@ It is therefore recommended to use the macro forms of logging (`error!`, `debug!
24042404
assert_expr : "assert" expr ;
24052405
~~~~~~~~
24062406

2407-
An `assert` expression is similar to a `check` expression, except
2408-
the condition may be any boolean-typed expression, and the compiler makes no
2409-
use of the knowledge that the condition holds if the program continues to
2410-
execute after the `assert`.
2407+
> **Note:** In future versions of Rust, `assert` will be changed from a full expression to a macro.
24112408
2409+
An `assert` expression causes the program to fail if its `expr` argument evaluates to `false`.
2410+
The failure carries string representation of the false expression.
24122411

24132412
# Type system
24142413

0 commit comments

Comments
 (0)