tvl-depot/src/util/trait_impls.rs
Griffin Smith 9db5fad2f9 Describe what you see when you walk over it
If the character walks over any number of entities, describe those
entities to the character.
2019-07-29 11:22:39 -04:00

17 lines
436 B
Rust

macro_rules! ref_impl {
(impl<T: $traitb: ident $(+ $bound:ident)*> $traiti:ident for &T {
$($body:tt)*
}) => {
impl<'a, T: $traitb $(+ $bound)*> $traiti for &'a T {
$($body)*
}
impl<'a, T: $traitb $(+ $bound)*> $traiti for &'a mut T {
$($body)*
}
impl<T: $traitb $(+ $bound)*> $traiti for ::std::boxed::Box<T> {
$($body)*
}
};
}