]> git.lizzy.rs Git - rust.git/commit
Restore (and reword) the warning against passing invalid values to mem::forget.
authorHrvoje Niksic <hniksic@gmail.com>
Wed, 4 Mar 2020 21:12:53 +0000 (22:12 +0100)
committerHrvoje Niksic <hniksic@gmail.com>
Thu, 19 Mar 2020 13:49:21 +0000 (14:49 +0100)
commit2a08b0e3006aeb997e42d5df135eea63b071fa75
tree89a78e14cf0d9177dd664a6e09ccc0a8073e0934
parent8e0398c060ba50bde4fe47a3685c0857285001bd
Restore (and reword) the warning against passing invalid values to mem::forget.

As pointed out by Ralf Jung, dangling references and boxes are
undefined behavior as per
https://doc.rust-lang.org/reference/behavior-considered-undefined.html
and the Miri checker.
src/libcore/mem/mod.rs