| error[E0308]: mismatched types |
| --> $DIR/issue-26480.rs:16:19 |
| | |
| LL | $arr.len() * size_of($arr[0])); |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected u64, found usize |
| ... |
| LL | write!(hello); |
| | -------------- in this macro invocation |
| help: you can convert an `usize` to `u64` and panic if the converted value wouldn't fit |
| | |
| LL | ($arr.len() * size_of($arr[0])).try_into().unwrap()); |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| |
| error[E0605]: non-primitive cast: `{integer}` as `()` |
| --> $DIR/issue-26480.rs:22:19 |
| | |
| LL | ($x:expr) => ($x as ()) |
| | ^^^^^^^^ |
| ... |
| LL | cast!(2); |
| | --------- in this macro invocation |
| | |
| = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait |
| |
| error: aborting due to 2 previous errors |
| |
| Some errors have detailed explanations: E0308, E0605. |
| For more information about an error, try `rustc --explain E0308`. |