Skip to content

Alternative for use of unstable library feature 'ptr_from_ref' #231

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

Closed
Jeadie opened this issue Apr 1, 2024 · 2 comments
Closed

Alternative for use of unstable library feature 'ptr_from_ref' #231

Jeadie opened this issue Apr 1, 2024 · 2 comments

Comments

@Jeadie
Copy link

Jeadie commented Apr 1, 2024

Using llama-cpp-2 = "0.1.45" as a dependency requires using nightly rust for the unstable feature 'ptr_from_ref'.

Example build error:

error[E0658]: use of unstable library feature 'ptr_from_ref'
   --> /Users/jeadie/.cargo/registry/src/index.crates.io-6f17d22bba15001f/llama-cpp-2-0.1.45/src/token/data_array.rs:362:22
    |
362 |         let mu_ptr = ptr::from_mut(mu);
    |                      ^^^^^^^^^^^^^
    |
    = note: see issue #106116 <https://github.com/rust-lang/rust/issues/106116> for more information

Is there any simple alternative for the underlying DataArray implementation? One alternative I have verified is at Jeadie/llama-cpp-rs#c271be.

@MarcusDunn
Copy link
Contributor

I believe it's been stabilized, what version of rust are you using?

@Jeadie
Copy link
Author

Jeadie commented Apr 2, 2024

I think you are right. I am using cargo 1.75.0. The stablising PR is in 1.76.1. Will verify.

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

No branches or pull requests

2 participants