]> git.lizzy.rs Git - rust.git/commit
Mark Arc function get_mut and method make_unique unsafe
authorUlrik Sverdrup <root@localhost>
Sat, 30 May 2015 20:03:57 +0000 (22:03 +0200)
committerUlrik Sverdrup <root@localhost>
Sat, 30 May 2015 20:15:40 +0000 (22:15 +0200)
commit32211e1d27c258c62cafb6ba357e67db932367bf
tree56e895dafa8fce96d2c65a5dd55bb03f82e8dca9
parentee1ba33c4c679e679b0fd95aaf7145e7ebc275d4
Mark Arc function get_mut and method make_unique unsafe

This is a temporary mitigation for issue #24880 which points out that
these functions are racy in a particular situation where weak pointers
exist.

To mitigate this, mark the functions unsafe until this can be fixed or
another decision is made.

This is a breaking change to unstable API, because the new version
requires an `unsafe` block. Review carefully if weak pointers may race
for any uses of this API and consider abandoning it.

[breaking-change]
src/liballoc/arc.rs