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(internal_syntax)]
5#[unstable(feature = "unsafe_binders", issue = "130516")]
6#[diagnostic::opaque]
7pub macro unwrap_binder($expr:expr $( ; $ty:ty )?) {
8    k#unwrap_binder($expr $( , $ty )?)
9}
10
11/// Wrap a type into an unsafe binder.
12#[allow_internal_unstable(internal_syntax)]
13#[unstable(feature = "unsafe_binders", issue = "130516")]
14#[diagnostic::opaque]
15pub macro wrap_binder($expr:expr $( ; $ty:ty )?) {
16    k#wrap_binder($expr $( , $ty )?)
17}