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

Upgrade to Bitflags 1.0 #766

Closed
Susurrus opened this issue Sep 14, 2017 · 0 comments
Closed

Upgrade to Bitflags 1.0 #766

Susurrus opened this issue Sep 14, 2017 · 0 comments
Milestone

Comments

@Susurrus
Copy link
Contributor

This isn't straightforward because something about 944ee530cd04712021ee21a60f1ef59d2ab6d489 broke our libc_bitflags! macro with the following error:

   Compiling bitflags v0.9.1
   Compiling nix v0.10.0-pre
error: no rules expected the token `cfg(any(target_os = "android", target_os = "linux"))`
   --> src/macros.rs:129:19
    |
129 |                   #[$attr]
    |                     ^^^^^
    | 
   ::: src/fcntl.rs
    |
11  | / libc_bitflags!{
12  | |     pub struct AtFlags: c_int {
13  | |         AT_SYMLINK_NOFOLLOW;
14  | |         #[cfg(any(target_os = "android", target_os = "linux"))]
...   |
18  | |     }
19  | | }
    | |_- in this macro invocation

error: Could not compile `nix`.

To learn more, run the command again with --verbose.

So that should get figured out so we get nice constant scoping in our docs. Note that this will require use to require 1.20 as our minimum Rust version, but I think it's worth it for us to switch to that because of the significant documentation win.

@Susurrus Susurrus added this to the 1.0 milestone Nov 5, 2017
bors bot added a commit that referenced this issue Dec 3, 2017
801: Upgrade to Bitflags 1.0 r=asomers a=Susurrus

The libc_bitflags! macro was replaced with a non-recursive one supporting
only public structs. I could not figure out how to make the old macro work
with the upgrade, so I reworked part of the bitflags! macro directly to suit
our needs, much as the original recursive macro was made. There are no uses
of this macro for non-public structs, so this is not a problem for internal code.

Closes #766.
@bors bors bot closed this as completed in #801 Dec 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant