1#[macro_export]
2/// Pin a value on the stack such that it can no longer be moved.
3macro_rules! pin {
4 ($($x:ident),* $(,)?) => {
5 $(
6let mut $x = $x;
7#[allow(unused_mut)]
8let mut $x = unsafe {
9 core::pin::Pin::new_unchecked(&mut $x)
10 };
11 )*
12 }
13}