-
-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix type error for 32-bit freebsd (on i386, armv6, armv7, powerpc) #669
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9f7c22c still fails: error[E0282]: type annotations needed
--> src/freebsd/disk.rs:65:55
|
65 | disk.total_space = vfs.f_blocks * vfs.f_frsize as _;
| ^ cannot infer type
|
= note: type must be known at this point
error[E0282]: type annotations needed
--> src/freebsd/disk.rs:132:57
|
132 | total_space: vfs.f_blocks * vfs.f_frsize as _,
| ^ cannot infer type
|
= note: type must be known at this point
For more information about this error, try `rustc --explain E0282`.
error: could not compile `sysinfo` due to 2 previous errors |
9f7c22c
to
b67a41c
Compare
And now? |
b67a41c still fails: error[E0425]: cannot find value `f_frsize` in this scope
--> src/freebsd/disk.rs:136:41
|
136 | total_space: vfs.f_blocks * f_frsize,
| ^^^^^^^^ help: a local variable with a similar name exists: `frsize`
error[E0425]: cannot find value `f_frsize` in this scope
--> src/freebsd/disk.rs:137:45
|
137 | available_space: vfs.f_favail * f_frsize,
| ^^^^^^^^ help: a local variable with a similar name exists: `frsize`
For more information about this error, try `rustc --explain E0425`.
error: could not compile `sysinfo` due to 2 previous errors |
a457c83
to
b67a41c
Compare
a457c83 still fails: error[E0308]: mismatched types
--> src/freebsd/disk.rs:65:39
|
65 | disk.total_space = vfs.f_blocks * vfs.f_frsize;
| ^^^^^^^^^^^^ expected `u64`, found `u32`
error[E0277]: cannot multiply `u64` by `u32`
--> src/freebsd/disk.rs:65:37
|
65 | disk.total_space = vfs.f_blocks * vfs.f_frsize;
| ^ no implementation for `u64 * u32`
|
= help: the trait `Mul<u32>` is not implemented for `u64`
error[E0308]: mismatched types
--> src/freebsd/disk.rs:66:43
|
66 | disk.available_space = vfs.f_favail * vfs.f_frsize;
| ^^^^^^^^^^^^ expected `u64`, found `u32`
error[E0277]: cannot multiply `u64` by `u32`
--> src/freebsd/disk.rs:66:41
|
66 | disk.available_space = vfs.f_favail * vfs.f_frsize;
| ^ no implementation for `u64 * u32`
|
= help: the trait `Mul<u32>` is not implemented for `u64`
error[E0308]: mismatched types
--> src/freebsd/disk.rs:132:41
|
132 | total_space: vfs.f_blocks * vfs.f_frsize,
| ^^^^^^^^^^^^ expected `u64`, found `u32`
error[E0277]: cannot multiply `u64` by `u32`
--> src/freebsd/disk.rs:132:39
|
132 | total_space: vfs.f_blocks * vfs.f_frsize,
| ^ no implementation for `u64 * u32`
|
= help: the trait `Mul<u32>` is not implemented for `u64`
error[E0308]: mismatched types
--> src/freebsd/disk.rs:133:45
|
133 | available_space: vfs.f_favail * vfs.f_frsize,
| ^^^^^^^^^^^^ expected `u64`, found `u32`
error[E0277]: cannot multiply `u64` by `u32`
--> src/freebsd/disk.rs:133:43
|
133 | available_space: vfs.f_favail * vfs.f_frsize,
| ^ no implementation for `u64 * u32`
|
= help: the trait `Mul<u32>` is not implemented for `u64`
Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `sysinfo` due to 8 previous errors |
b67a41c
to
47110b3
Compare
Sorry, failed a push (working on two PRs at the same time...). And now? |
47110b3 built fine:
|
av1an-0.3.0 built with this PR also works fine.
Thanks for the quick fix. Applied downstream. |
Thanks for your help! It's late here so I'll make a release with this fix tomorrow. |
@jbeich The new version has been released with this fix. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #668.
@jbeich: I'll try to check how to have a CI check for that as well. In the meantime, can you confirm it's fixing your issue please?