File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -864,11 +864,11 @@ end
864864
865865 Using `@inbounds` may return incorrect results/crashes/corruption
866866 for out-of-bounds indices. The user is responsible for checking it manually.
867- Only use `@inbounds` when it is certain from the information locally available
868- that all accesses are in bounds. In particular, using `1:length(A)` instead of
869- ` eachindex(A)` in a function like the one above is _not_ safely inbounds because
870- the first index of `A` may not be `1` for all user defined types that subtype
871- `AbstractArray`.
867+ Only use `@inbounds` when you are certain that all accesses are in bounds (as
868+ undefined behavior, e.g. crashes, might occur if this assertion is violated). For
869+ example, using `1:length(A)` instead of ` eachindex(A)` in a function like
870+ the one above is _not_ safely inbounds because the first index of `A` may not
871+ be `1` for all user defined types that subtype `AbstractArray`.
872872"""
873873macro inbounds (blk)
874874 return Expr (:block ,
You can’t perform that action at this time.
0 commit comments