-
Notifications
You must be signed in to change notification settings - Fork 9
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
building with stable rust instead of nightly #3
Comments
Yes, doc tests are failing because of some example code in the doc strings. |
I'm new to rust and I'm not sure why Unique was here in the first place so I mostly tried NonNull after getting the following compiler message: From what I understand, replacing Unique with NonNull is trivial and makes it clear that the pointer is valid, while switching to *mut seems to require slightly more work .
The build and example work with these two options, I can prepare a pull request with the one you prefer. |
With using NotNull you give the compiler a guarantee so checks can be optimized. The guarantees are actually weaker than Unique so replacing it should not create safety problems. |
I would like to use this crate without having to rely on the nightly toolchain. I could build clingo-rs with the stable toolchain (using rust 1.31) after replacing std::ptr::Unique with std::ptr::NonNull (according to rust-lang/rust#27730, Unique will remain unstable for ever).
After this change, "cargo test" fails (but it was already failing before) but all examples seem to run properly.
Do you think it is a valid change or is there something which can be corrupted by using NonNull instead of Unique?
The text was updated successfully, but these errors were encountered: