Improve thread safety docs/bounds for PrimitiveMut

PiperOrigin-RevId: 591047379
pull/15096/head
Alyssa Haroldsen 1 year ago committed by Copybara-Service
parent f51182b543
commit 8505082f16
  1. 2
      rust/primitive.rs
  2. 2
      rust/vtable.rs

@ -37,6 +37,8 @@ impl<'msg, T> PrimitiveMut<'msg, T> {
}
}
// SAFETY: all `T` that can perform mutations don't mutate through a shared
// reference.
unsafe impl<'msg, T> Sync for PrimitiveMut<'msg, T> {}
impl<'msg, T> PrimitiveMut<'msg, T>

@ -432,6 +432,8 @@ pub trait PrimitiveWithRawVTable:
+ Debug
+ 'static
+ ProxiedWithPresence
+ Sync
+ Send
+ for<'msg> Proxied<View<'msg> = Self, Mut<'msg> = PrimitiveMut<'msg, Self>>
{
}

Loading…
Cancel
Save