1 error[E0308]: mismatched types
2 --> $DIR/issue-26480.rs:16:19
4 LL | write(stdout, $arr.as_ptr() as *const i8,
5 | ----- arguments to this function are incorrect
6 LL | $arr.len() * size_of($arr[0]));
7 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `usize`
10 | ------------- in this macro invocation
12 note: function defined here
13 --> $DIR/issue-26480.rs:2:8
15 LL | fn write(fildes: i32, buf: *const i8, nbyte: u64) -> i64;
17 = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info)
18 help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
20 LL | ($arr.len() * size_of($arr[0])).try_into().unwrap());
21 | + +++++++++++++++++++++
23 error[E0605]: non-primitive cast: `{integer}` as `()`
24 --> $DIR/issue-26480.rs:22:19
26 LL | ($x:expr) => ($x as ())
27 | ^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
30 | -------- in this macro invocation
32 = note: this error originates in the macro `cast` (in Nightly builds, run with -Z macro-backtrace for more info)
34 error: aborting due to 2 previous errors
36 Some errors have detailed explanations: E0308, E0605.
37 For more information about an error, try `rustc --explain E0308`.