error[E0308]: mismatched types
--> $DIR/issue-26480.rs:16:19
|
+LL | write(stdout, $arr.as_ptr() as *const i8,
+ | ----- arguments to this function are incorrect
LL | $arr.len() * size_of($arr[0]));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `usize`
...
LL | write!(hello);
- | -------------- in this macro invocation
+ | ------------- in this macro invocation
|
+note: function defined here
+ --> $DIR/issue-26480.rs:2:8
+ |
+LL | fn write(fildes: i32, buf: *const i8, nbyte: u64) -> i64;
+ | ^^^^^
= note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info)
help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
|
| ^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
...
LL | cast!(2);
- | --------- in this macro invocation
+ | -------- in this macro invocation
|
= note: this error originates in the macro `cast` (in Nightly builds, run with -Z macro-backtrace for more info)