Skip to main content

core/
unsafe_binder.rs

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#[diagnostic::opaque]
7pub macro unwrap_binder {
8    ($expr:expr) => {
9        builtin # unwrap_binder ( $expr )
10    },
11    ($expr:expr ; $ty:ty) => {
12        builtin # unwrap_binder ( $expr, $ty )
13    },
14}
15
16/// Wrap a type into an unsafe binder.
17#[allow_internal_unstable(builtin_syntax)]
18#[unstable(feature = "unsafe_binders", issue = "130516")]
19#[diagnostic::opaque]
20pub macro wrap_binder {
21    ($expr:expr) => {
22        builtin # wrap_binder ( $expr )
23    },
24    ($expr:expr ; $ty:ty) => {
25        builtin # wrap_binder ( $expr, $ty )
26    },
27}