Skip to content
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

Replace std::ffi::c_uint w/ std::os::raw::c_uint #62

Closed
wants to merge 1 commit into from

Conversation

mishig25
Copy link
Collaborator

@mishig25 mishig25 commented Nov 7, 2022

Getting error below on Intel CPU Macbook:

cargo check inside safetensors/bindings/python

(base) Mishigs-MacBook-Pro:python mishig$ cargo check
    Checking safetensors-python v0.2.3 (/Users/mishig/Desktop/safetensors/bindings/python)
error[E0412]: cannot find type `c_uint` in module `std::ffi`
  --> src/lib.rs:33:16
   |
33 | ) -> std::ffi::c_uint;
   |                ^^^^^^ not found in `std::ffi`
   |
help: consider importing this type alias
   |
3  | use std::os::raw::c_uint;

However, the error goes away when std::ffi::c_uint is replaced with std::os::raw::c_uint

I don't know what's the difference between the two: their docs look identical

@mishig25 mishig25 requested a review from Narsil November 7, 2022 14:25
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

@Narsil
Copy link
Collaborator

Narsil commented Nov 10, 2022

which rust version do you have ?

I think I'd rather use ffi than os but I'd prefer to understand why it's missing.

@mishig25
Copy link
Collaborator Author

oh you are right:
updated rustc --version from 1.60 to 1.65 & the error is gone !

@mishig25 mishig25 closed this Nov 15, 2022
@mishig25 mishig25 deleted the fix_c_uint_notfound branch November 15, 2022 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants