Static assertions that certain types implement Copy

This commit is contained in:
Ayaz Hafiz 2022-04-21 09:19:33 -04:00
parent 188bd33f1f
commit 435781aa5b
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 11 additions and 0 deletions

View file

@ -66,6 +66,14 @@ macro_rules! assert_sizeof_all {
};
}
/// Assert that a type has `Copy`
#[macro_export]
macro_rules! assert_copyable {
($t: ty) => {
static_assertions::assert_impl_all!($t: Copy);
};
}
// LARGE SCALE PROJECTS
//
// This section is for "todo!"-style macros enabled in sections where large-scale changes to the