1 error[E0308]: mismatched types
2 --> $DIR/issue-26480.rs:16:19
4 LL | $arr.len() * size_of($arr[0]));
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `usize`
8 | ------------- in this macro invocation
10 = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info)
11 help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
13 LL | ($arr.len() * size_of($arr[0])).try_into().unwrap());
14 | + +++++++++++++++++++++
16 error[E0605]: non-primitive cast: `{integer}` as `()`
17 --> $DIR/issue-26480.rs:22:19
19 LL | ($x:expr) => ($x as ())
20 | ^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
23 | -------- in this macro invocation
25 = note: this error originates in the macro `cast` (in Nightly builds, run with -Z macro-backtrace for more info)
27 error: aborting due to 2 previous errors
29 Some errors have detailed explanations: E0308, E0605.
30 For more information about an error, try `rustc --explain E0308`.