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

Project doesn't build - can't find ptr::from_ref #1

Closed
binarymax opened this issue Mar 27, 2023 · 3 comments
Closed

Project doesn't build - can't find ptr::from_ref #1

binarymax opened this issue Mar 27, 2023 · 3 comments

Comments

@binarymax
Copy link

Hi! I cloned the repo and ran cargo build and I get the following error:

error[E0425]: cannot find function `from_ref` in module `ptr`
   --> src/task/server.rs:246:37
    |
246 |             drop(Box::from_raw(ptr::from_ref(config).cast_mut()));
    |                                     ^^^^^^^^ not found in `ptr`
    |

I am using rustc/cargo version 1.60.0 (on Ubuntu 20.04)

Any advice?

@binarymax
Copy link
Author

Did some digging and looks like I need a new version of Rust! rust-lang/rust#106116

@antoniosarosi
Copy link
Owner

Well, I used a nightly version for this project, you can use rustup override set nightly while located in the project directory and then try to build it again. If you want to use the stable version, you have to modify that line of code:

drop(Box::from_raw(config as *mut Server));

Not sure if that will compile, I can't test it right now. I'll check later to confirm.

@binarymax
Copy link
Author

I just used nightly and got it to build. Thanks for the quick response!

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