]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/mismatched_types/issue-26480.stderr
Resolve vars before emitting coerce suggestions too
[rust.git] / src / test / ui / mismatched_types / issue-26480.stderr
index 579a5b7ecb98ceec6f58c6b28aa1e726b38a7532..ae10a00671e61e3ce921204abacb22c701adb28f 100644 (file)
@@ -15,6 +15,10 @@ note: function defined here
 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
+   |
+LL |                   ($arr.len() * size_of($arr[0])).try_into().unwrap());
+   |                   +                             +++++++++++++++++++++
 
 error[E0605]: non-primitive cast: `{integer}` as `()`
   --> $DIR/issue-26480.rs:22:19