Skip to content

Conversation

SteveLauC
Copy link
Member

@SteveLauC SteveLauC commented Sep 23, 2024

What does this PR do

Before this PR, I could not build Nix with feature socket enabled on macOS:

$ cargo b --features socket -q
error: struct `GetCString` is never constructed
    --> src/sys/socket/sockopt.rs:1700:8
     |
1700 | struct GetCString<T: AsMut<[u8]>> {
     |        ^^^^^^^^^^
     |
note: the lint level is defined here
    --> src/lib.rs:50:9
     |
50   | #![deny(unused)]
     |         ^^^^^^
     = note: `#[deny(dead_code)]` implied by `#[deny(unused)]`

error: could not compile `nix` (lib) due to 1 previous error

I am using Rust 1.81, this was not caught in our CI because it won't happen with Rust 1.69:

$ cargo +1.69 b --features socket -q

$ echo $?
0

This PR fixes the issue.

Checklist:

  • I have read CONTRIBUTING.md
  • I have written necessary tests and rustdoc comments
  • A change log has been added if this PR modifies nix's API

@SteveLauC SteveLauC added this pull request to the merge queue Sep 24, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 24, 2024
@SteveLauC SteveLauC added this pull request to the merge queue Sep 24, 2024
Merged via the queue into nix-rust:master with commit 14fb973 Sep 24, 2024
39 checks passed
@SteveLauC SteveLauC deleted the fix/features branch September 24, 2024 01:24
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.

1 participant