]> git.lizzy.rs Git - rust.git/commit
std: Ensure AssertRecoverSafe indeed is more often
authorAlex Crichton <alex@alexcrichton.com>
Mon, 21 Dec 2015 17:39:45 +0000 (09:39 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 21 Dec 2015 22:00:17 +0000 (14:00 -0800)
commitcb3826d9adcb185fbf438602e82ae99ff1878779
treee76bf3242b13d29bf488a2acdeabd4df9172d91c
parente2834a20e7c5bbfb1502f582545153dc6b25a70c
std: Ensure AssertRecoverSafe indeed is more often

Types like `&AssertRecoverSafe<T>` and `Rc<AssertRecoverSafe<T>>` were
mistakenly not considered recover safe, but the point of the assertion wrapper
is that it indeed is! This was caused by an interaction between the
`RecoverSafe` and `NoUnsafeCell` marker traits, and this is updated by adding an
impl of the `NoUnsafeCell` marker trait for `AssertRecoverSafe` to ensure that
it never interacts with the other negative impls of `RecoverSafe`.

cc #30510
src/libstd/panic.rs
src/test/run-pass/panic-safe.rs