Skip to content

Conversation

@jackpot51
Copy link
Contributor

These functions were added to libc 0.2.181 in rust-lang/libc#4963.

@xtqqczze
Copy link
Contributor

Can we get this merged and a new rustix release ASAP, to fix compile errors with libc 0.2.181:

error[E0308]: mismatched types
  --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/backend/libc/fs/makedev.rs:53:5
   |
50 |   pub(crate) fn makedev(maj: u32, min: u32) -> Dev {
   |                                                --- expected `u64` because of return type
...
53 | /     ((i64::from(maj) & 0xffff_f000_i64) << 32)
54 | |         | ((i64::from(maj) & 0x0000_0fff_i64) << 8)
55 | |         | ((i64::from(min) & 0xffff_ff00_i64) << 12)
56 | |         | (i64::from(min) & 0x0000_00ff_i64)
   | |____________________________________________^ expected `u64`, found `i64`
   |
help: you can convert an `i64` to a `u64` and panic if the converted value doesn't fit
   |
53 ~     (((i64::from(maj) & 0xffff_f000_i64) << 32)
54 |         | ((i64::from(maj) & 0x0000_0fff_i64) << 8)
55 |         | ((i64::from(min) & 0xffff_ff00_i64) << 12)
56 ~         | (i64::from(min) & 0x0000_00ff_i64)).try_into().unwrap()
   |

For more information about this error, try `rustc --explain E0308`.
error: could not compile `rustix` (lib) due to 1 previous error

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

Successfully merging this pull request may close these issues.

2 participants