Diffstat (limited to 'src/any/static_wrapper.rs')
| -rw-r--r-- | src/any/static_wrapper.rs | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/src/any/static_wrapper.rs b/src/any/static_wrapper.rs index c99b037..d8c22db 100644 --- a/src/any/static_wrapper.rs +++ b/src/any/static_wrapper.rs @@ -8,8 +8,7 @@ use super::*; pub struct OwnedStatic<T: ?Sized>(pub T); bijective_higher_ranked_type! { - /// Higher ranked type for [`OwnedStatic`]. - pub for['ctx] type DynOwnedStatic[][T]: WithContextLt['ctx][] + for['ctx] use OwnedStatic[][T]: WithContextLt['ctx][] for<'a> (OwnedStatic<T>) where { @@ -18,9 +17,9 @@ bijective_higher_ranked_type! { } bijective_higher_ranked_type! { - pub type [][T][]: TypeName[][] + use OwnedStatic[][T][]: TypeName[][] for<'ctx> - (DynOwnedStatic<T>) + (OwnedStatic<T>) where { T: ?Sized + 'static } @@ -31,8 +30,7 @@ bijective_higher_ranked_type! { pub struct BorrowedStatic<'ctx, T: ?Sized>(pub &'ctx T); bijective_higher_ranked_type! { - /// Higher ranked type for [`BorrowedStatic`]. - pub type DynBorrowedStatic['ctx][T]: WithContextLt['ctx][] + use BorrowedStatic['ctx][T]: WithContextLt['ctx][] for<'a> (BorrowedStatic<'ctx, T>) where { @@ -43,7 +41,7 @@ bijective_higher_ranked_type! { bijective_higher_ranked_type! { pub type [][T][]: TypeName[][] for<'ctx> - (DynBorrowedStatic<'ctx, T>) + (BorrowedStatic<'ctx, T>) where { T: ?Sized + 'static } @@ -54,8 +52,7 @@ bijective_higher_ranked_type! { pub struct TempBorrowedStatic<'a, T: ?Sized>(pub &'a T); bijective_higher_ranked_type! { - /// Higher ranked type for [`TempBorrowedStatic`]. - pub type DynTempBorrowedStatic['ctx][T]: WithContextLt['ctx][] + use TempBorrowedStatic['ctx][T]: WithContextLt['ctx][] for<'a> (TempBorrowedStatic<'a, T>) where { @@ -64,9 +61,9 @@ bijective_higher_ranked_type! { } bijective_higher_ranked_type! { - pub type [][T][]: TypeName[][] + pub type [][T]: TypeName[][] for<'ctx> - (DynTempBorrowedStatic<'ctx, T>) + (TempBorrowedStatic<'ctx, T>) where { T: ?Sized + 'static } @@ -77,8 +74,7 @@ bijective_higher_ranked_type! { pub struct BorrowedMutStatic<'ctx, T: ?Sized>(pub &'ctx mut T); bijective_higher_ranked_type! { - /// Higher ranked type for [`BorrowedMutStatic`]. - pub type DynBorrowedMutStatic['ctx][T]: WithContextLt['ctx][] + use BorrowedMutStatic['ctx][T]: WithContextLt['ctx][] for<'a> (BorrowedMutStatic<'ctx, T>) where { @@ -89,7 +85,7 @@ bijective_higher_ranked_type! { bijective_higher_ranked_type! { pub type [][T][]: TypeName[][] for<'ctx> - (DynBorrowedMutStatic<'ctx, T>) + (BorrowedMutStatic<'ctx, T>) where { T: ?Sized + 'static } @@ -100,8 +96,7 @@ bijective_higher_ranked_type! { pub struct TempBorrowedMutStatic<'a, T: ?Sized>(pub &'a mut T); bijective_higher_ranked_type! { - /// Higher ranked type for [`TempBorrowedMutStatic`]. - pub type DynTempBorrowedMutStatic['ctx][T]: WithContextLt['ctx][] + use TempBorrowedMutStatic['ctx][T]: WithContextLt['ctx][] for<'a> (TempBorrowedMutStatic<'a, T>) where { @@ -110,9 +105,9 @@ bijective_higher_ranked_type! { } bijective_higher_ranked_type! { - pub type [][T][]: TypeName[][] + pub type[][T][]: TypeName[][] for<'ctx> - (DynTempBorrowedMutStatic<'ctx, T>) + (TempBorrowedMutStatic<'ctx, T>) where { T: ?Sized + 'static } @@ -125,8 +120,7 @@ pub struct BoxedStatic<T: ?Sized>(pub Box<T>); #[cfg(feature = "alloc")] bijective_higher_ranked_type! { - /// Higher ranked type for [`BoxedStatic`]. - pub for['ctx] type DynBoxedStatic[][T]: WithContextLt['ctx][] + for['ctx] use BoxedStatic[][T]: WithContextLt['ctx][] for<'a> (BoxedStatic<T>) where { @@ -136,9 +130,9 @@ bijective_higher_ranked_type! { #[cfg(feature = "alloc")] bijective_higher_ranked_type! { - pub type [][T][]: TypeName[][] + use BoxedStatic [][T][]: TypeName[][] for<'ctx> - (DynBoxedStatic<T>) + (BoxedStatic<T>) where { T: ?Sized + 'static } |