macro_rules! rename {
    ($(let $p:pat_param = $from:ident);+$(;)?) => { ... };
}
Expand description
use std::any::TypeId;
fn check<T: 'static>(_x: T) {
  assert_eq!(TypeId::of::<kmacros_shim::HiddenVariable>(), TypeId::of::<T>());
}
let x = 1;
kmacros_shim::rename!(let a = x);
assert_eq!(a, 1);
check(x);
kmacros_shim::rename!(let b = a;);
assert_eq!(b, 1);
check(a);
let y = 2;
kmacros_shim::rename! {
  let b = y;
  let a = b;
}
assert_eq!(a, 2);
check(b);
check(y);
let x = 1;
let y = 2;
kmacros_shim::rename! {
  let a = x;
  let b = y;
}
assert_eq!(a, 1);
assert_eq!(b, 2);
check(x);
check(y);
kmacros_shim::rename!(let a = a;);
check(a);
let x = 1;
kmacros_shim::rename!(let a = x);
assert_eq!(x, 1);