Skip to content

no invalid_mut in ptr #122

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
rice7th opened this issue Feb 25, 2024 · 5 comments · Fixed by #123 or sunfishcode/origin#109
Closed

no invalid_mut in ptr #122

rice7th opened this issue Feb 25, 2024 · 5 comments · Fixed by #123 or sunfishcode/origin#109

Comments

@rice7th
Copy link
Contributor

rice7th commented Feb 25, 2024

Hello!

I've been trying to compile a toy miniquad project using both eyra and mustang, but unfortunately in both instances I got the same errors:

error[E0432]: unresolved import `core::ptr::invalid_mut`
 --> /home/rice7th/.cargo/registry/src/index.crates.io-6f17d22bba15001f/c-scape-0.15.40/src/brk.rs:2:17
  |
2 | use core::ptr::{invalid_mut, null_mut};
  |                 ^^^^^^^^^^^ no `invalid_mut` in `ptr`

error[E0432]: unresolved import `core::ptr::invalid_mut`
 --> /home/rice7th/.cargo/registry/src/index.crates.io-6f17d22bba15001f/c-scape-0.15.40/src/syscall.rs:5:5
  |
5 | use core::ptr::invalid_mut;
  |     ^^^^^^^^^^^^^^^^^^^^^^ no `invalid_mut` in `ptr`

error[E0425]: cannot find function `invalid_mut` in module `ptr`
   --> /home/rice7th/.cargo/registry/src/index.crates.io-6f17d22bba15001f/c-scape-0.15.40/src/process_.rs:192:32
    |
192 |         libc::AT_HWCAP => ptr::invalid_mut(rustix::param::linux_hwcap().0),
    |                                ^^^^^^^^^^^ not found in `ptr`

error[E0425]: cannot find function `invalid_mut` in module `ptr`
   --> /home/rice7th/.cargo/registry/src/index.crates.io-6f17d22bba15001f/c-scape-0.15.40/src/process_.rs:193:33
    |
193 |         libc::AT_HWCAP2 => ptr::invalid_mut(rustix::param::linux_hwcap().1),
    |                                 ^^^^^^^^^^^ not found in `ptr`

Some errors have detailed explanations: E0425, E0432.
For more information about an error, try `rustc --explain E0425`.
error: could not compile `c-scape` (lib) due to 4 previous errors

Everything else compiles just fine.

Using the latest eyra/mustang and the latest nightly. Even adding the #![feature(strict_provenance)] feature gate does nothing.

@sunfishcode
Copy link
Owner

Looks like invalid_mut was recently renamed to without_provenance_mut. If you're able to submit a PR updating c-scape, I can probably merge it; otherwise I'll fix this when I'm back at a computer.

@rice7th
Copy link
Contributor Author

rice7th commented Feb 25, 2024

@sunfishcode Sure! I am trying to look into renaming all the functions, going to keep you updated.

@rice7th
Copy link
Contributor Author

rice7th commented Feb 25, 2024

Done =)

@rice7th
Copy link
Contributor Author

rice7th commented Feb 27, 2024

@sunfishcode Please reopen the issue since I still need to fix the other PR.

(apparently I can't currently reopen the issue for some reason).

@sunfishcode
Copy link
Owner

Re-opening...

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
2 participants