You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use some packages that depend on rustix. Then I got a compiler error on [email protected]. Is this a code error in rustix?
My env:
rustc 1.82.0 (f6e511eec 2024-10-15)
cargo 1.82.0 (8f40fc59f 2024-08-21)
Macbook pro M1 pro
Compiling rustix v0.38.41
error[E0015]: cannot call non-const fn `libc::CMSG_SPACE`in constant functions
--> /Users/limuyao/.cargo/registry/src/rsproxy.cn-0dccff568467c15b/rustix-0.38.41/src/net/send_recv/msg.rs:120:14
|
120 | unsafe { c::CMSG_SPACE(converted_len) as usize }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
For more information about this error, try `rustc --explain E0015`.
error: could not compile `rustix` (lib) due to 1 previous error
The text was updated successfully, but these errors were encountered:
I don't know; I'm not able to reproduce this. Are you cross-compiling here, and if so, to what target? What version of the libc crate is in use here?
@sunfishcode Thank you for your reply.
Thanks to your reminder, I checked the issues in the libc repository and found that this seems to be an issue with libc.
This's the link to the related issue: rust-lang/libc#4115
I use some packages that depend on rustix. Then I got a compiler error on [email protected]. Is this a code error in rustix?
My env:
rustc 1.82.0 (f6e511eec 2024-10-15)
cargo 1.82.0 (8f40fc59f 2024-08-21)
Macbook pro M1 pro
The text was updated successfully, but these errors were encountered: