mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
Static assertions that certain types implement Copy
This commit is contained in:
parent
188bd33f1f
commit
435781aa5b
2 changed files with 11 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue