]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #89821 - crlf0710:unsafe_code_lint_test, r=Mark-Simulacrum
authorMatthias Krüger <matthias.krueger@famsik.de>
Fri, 15 Oct 2021 05:44:45 +0000 (07:44 +0200)
committerGitHub <noreply@github.com>
Fri, 15 Oct 2021 05:44:45 +0000 (07:44 +0200)
commitb74ae0487b81628f67f5ca66a12ebd636eb9cafe
treecbe3d8454b294af8a69fff8149db71b02da0fa01
parent36a1076d24697621a3bb67ef654b4eb79647aa54
parentc76c620e4ec7d504fe42c9ca66bb55511fc9b23f
Rollup merge of #89821 - crlf0710:unsafe_code_lint_test, r=Mark-Simulacrum

Add a strange test for `unsafe_code` lint.

The current behavior is a little surprising to me. I'm not sure whether people would change it, but at least let me document the current behavior with a test.

I learnt about this from the [totally-speedy-transmute](https://docs.rs/totally-speedy-transmute) crate.

cc #10599 the original implementation pr.