]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mismatched_types/issue-26480.stderr
Auto merge of #95454 - randomicon00:fix95444, r=wesleywiser
[rust.git] / src / test / ui / mismatched_types / issue-26480.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-26480.rs:16:19
3    |
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`
8 ...
9 LL |     write!(hello);
10    |     ------------- in this macro invocation
11    |
12 note: function defined here
13   --> $DIR/issue-26480.rs:2:8
14    |
15 LL |     fn write(fildes: i32, buf: *const i8, nbyte: u64) -> i64;
16    |        ^^^^^
17    = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info)
18
19 error[E0605]: non-primitive cast: `{integer}` as `()`
20   --> $DIR/issue-26480.rs:22:19
21    |
22 LL |     ($x:expr) => ($x as ())
23    |                   ^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
24 ...
25 LL |     cast!(2);
26    |     -------- in this macro invocation
27    |
28    = note: this error originates in the macro `cast` (in Nightly builds, run with -Z macro-backtrace for more info)
29
30 error: aborting due to 2 previous errors
31
32 Some errors have detailed explanations: E0308, E0605.
33 For more information about an error, try `rustc --explain E0308`.