Skip to content

Commit ec71394

Browse files
committed
---
yaml --- r: 3442 b: refs/heads/master c: 8c757fc h: refs/heads/master v: v3
1 parent acc0eef commit ec71394

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 5059c5f8fd6033a25c736363e8844f963dae512b
2+
refs/heads/master: 8c757fcd4063601279332806a52d13fcfbf6f04c

trunk/doc/rust.texi

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3641,14 +3641,12 @@ that is not actually checked at runtime. Thus, using a @code{claim} implies a
36413641
proof obligation to ensure---without compiler assistance---that an assertion
36423642
always holds.
36433643

3644-
With a command-line flag, the compiler can turn all @code{claim} expressions
3645-
into @code{check} expressions, but the default is to not check the assertion
3646-
contained in a @code{claim}.
3647-
3648-
The idea is to use @code{check} during development, with @code{claim}
3649-
providing the freedom to disable a few runtime checks in performance-critical
3650-
locations once code is debugged, while leaving the @code{claim} expressions in
3651-
the code as documentation.
3644+
Setting a runtime flag can turn all @code{claim} expressions
3645+
into @code{check} expressions in a compiled Rust program, but the default is to not check the assertion
3646+
contained in a @code{claim}. The idea behind @code{claim} is that performance profiling might identify a
3647+
few bottlenecks in the code where actually checking a given callee's predicate
3648+
is too expensive; @code{claim} allows the code to typecheck without removing
3649+
the predicate check at every other call site.
36523650

36533651
@node Ref.Expr.IfCheck
36543652
@subsection Ref.Expr.IfCheck

0 commit comments

Comments
 (0)