Hacker News new | ask | show | jobs
by _8dej 1249 days ago
Is there a way to turn this off?
1 comments

Not via a compiler flag, no. The way to "opt out" of bounds checks is to replace `foo[bar]` with `unsafe { foo.get_unchecked(bar) }` at a given callsite. And the use of `unsafe` is going to immediately raise the eyebrow of any code reviewer or auditor.