File tree 3 files changed +29
-0
lines changed
3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -354,6 +354,8 @@ pub mod random;
354
354
pub mod range;
355
355
pub mod result;
356
356
pub mod sync;
357
+ #[ unstable( feature = "unsafe_binders" , issue = "130516" ) ]
358
+ pub mod unsafe_binder;
357
359
358
360
pub mod fmt;
359
361
pub mod hash;
Original file line number Diff line number Diff line change
1
+ //! Operators used to turn types into unsafe binders and back.
2
+
3
+ /// Unwrap an unsafe binder into its underlying type.
4
+ #[ allow_internal_unstable( builtin_syntax) ]
5
+ #[ unstable( feature = "unsafe_binders" , issue = "130516" ) ]
6
+ pub macro unwrap_binder {
7
+ ( $expr: expr) => {
8
+ builtin # unwrap_binder ( $expr )
9
+ } ,
10
+ ( $expr: expr ; $ty: ty) => {
11
+ builtin # unwrap_binder ( $expr, $ty )
12
+ } ,
13
+ }
14
+
15
+ /// Wrap a type into an unsafe binder.
16
+ #[ allow_internal_unstable( builtin_syntax) ]
17
+ #[ unstable( feature = "unsafe_binders" , issue = "130516" ) ]
18
+ pub macro wrap_binder {
19
+ ( $expr: expr) => {
20
+ builtin # wrap_binder ( $expr )
21
+ } ,
22
+ ( $expr: expr ; $ty: ty) => {
23
+ builtin # wrap_binder ( $expr, $ty )
24
+ } ,
25
+ }
Original file line number Diff line number Diff line change @@ -544,6 +544,8 @@ pub use core::u64;
544
544
#[ stable( feature = "i128" , since = "1.26.0" ) ]
545
545
#[ allow( deprecated, deprecated_in_future) ]
546
546
pub use core:: u128;
547
+ #[ unstable( feature = "unsafe_binders" , issue = "130516" ) ]
548
+ pub use core:: unsafe_binder;
547
549
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
548
550
#[ allow( deprecated, deprecated_in_future) ]
549
551
pub use core:: usize;
You can’t perform that action at this time.
0 commit comments