]> git.lizzy.rs Git - rust.git/commit
Mark `Arc::from_inner` / `Rc::from_inner` as unsafe
authorSebastian Dröge <sebastian@centricular.com>
Sun, 10 Oct 2021 18:02:42 +0000 (21:02 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Sun, 10 Oct 2021 18:13:39 +0000 (21:13 +0300)
commit2e2c38e59be7d0308c8a58c0843e7af8d7211ee7
tree31dcedc218004f0a08258940679967a34de3d623
parent0c87288f92b7e6365d61cfbcbc453ea4c696c030
Mark `Arc::from_inner` / `Rc::from_inner` as unsafe

While it's an internal function, it is easy to create invalid Arc/Rcs to
a dangling pointer with it.

Fixes https://github.com/rust-lang/rust/issues/89740
library/alloc/src/rc.rs
library/alloc/src/sync.rs