mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
Note on why refcount tests need result type
This commit is contained in:
parent
12a330dd76
commit
ff0c0766ad
1 changed files with 3 additions and 1 deletions
|
@ -417,8 +417,10 @@ pub fn identity<T>(value: T) -> T {
|
|||
|
||||
#[allow(unused_macros)]
|
||||
macro_rules! assert_refcounts {
|
||||
// We need the result type to generate the test_wrapper, even though we ignore the value!
|
||||
// We can't just call `main` with no args, because some tests return structs, via pointer arg!
|
||||
// Also we need to know how much stack space to reserve for the struct.
|
||||
($src: expr, $ty: ty, $expected_refcounts: expr) => {
|
||||
// Same as above, except with an additional transformation argument.
|
||||
{
|
||||
let phantom = std::marker::PhantomData;
|
||||
let num_refcounts = $expected_refcounts.len();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue