Diffstat (limited to 'src/any/static_wrapper.rs')
-rw-r--r--src/any/static_wrapper.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/any/static_wrapper.rs b/src/any/static_wrapper.rs
index ce26fdd..d167257 100644
--- a/src/any/static_wrapper.rs
+++ b/src/any/static_wrapper.rs
@@ -3,6 +3,7 @@
use super::*;
/// Impl of [`TypeNameable`] for `'static` types that are owned (`T`).
+#[repr(transparent)]
pub struct OwnedStatic<T: ?Sized>(pub T);
nameable! {
@@ -12,6 +13,7 @@ nameable! {
}
/// Impl of [`TypeNameable`] for `'static` types that are borrowed (`&'lt T`).
+#[repr(transparent)]
pub struct BorrowedStatic<'lt, T: ?Sized>(pub &'lt T);
nameable! {
@@ -21,6 +23,7 @@ nameable! {
}
/// Impl of [`TypeNameable`] for `'static` types that are temporarily borrowed (`&'a T`).
+#[repr(transparent)]
pub struct TempBorrowedStatic<'a, T: ?Sized>(pub &'a T);
nameable! {
@@ -30,6 +33,7 @@ nameable! {
}
/// Impl of [`TypeNameable`] for `'static` types that are borrowed mutably (`&'lt mut T`).
+#[repr(transparent)]
pub struct BorrowedMutStatic<'lt, T: ?Sized>(pub &'lt mut T);
nameable! {
@@ -39,6 +43,7 @@ nameable! {
}
/// Impl of [`TypeNameable`] for `'static` types that are temporarily borrowed mutably (`&'a mut T`).
+#[repr(transparent)]
pub struct TempBorrowedMutStatic<'a, T: ?Sized>(pub &'a mut T);
nameable! {