logoalt Hacker News

davemptoday at 12:50 AM2 repliesview on HN

    let foo = [1, 2, 3];
    unsafe {
        *foo.get_unchecked_mut(4) = 5;
    }
Not sure why Rust evangelists always seem to ignore that unsafe exists.

Replies

dendixtoday at 1:56 AM

Hmmm... where could the oob access possibly be I can't tell

vmg12today at 2:50 AM

You can prevent unsafe from being used in a repo with linter rules.