Convert to associated constants #24

Merged
tamird merged 2 commits from associated-constants into master 2017-09-05 09:50:45 -05:00
tamird commented 2015-11-27 19:15:59 -06:00 (Migrated from github.com)

Two problems with this:

  • breaking API change
  • requires nightly

I suppose this will need to wait until associated constants are stable.

Two problems with this: - breaking API change - requires nightly I suppose this will need to wait until associated constants are stable.
alexcrichton commented 2015-11-28 09:48:02 -06:00 (Migrated from github.com)

Yeah for now this crate builds on stable, so we'll have to wait for associated constants to be stable to merge this unfortunately.

Yeah for now this crate builds on stable, so we'll have to wait for associated constants to be stable to merge this unfortunately.
phil-opp commented 2017-03-13 07:44:44 -05:00 (Migrated from github.com)

@tamird It seems like the associated_const feature will remain unstable for the near future. So it might make sense to pre-release this on crates.io as a separate crate (e.g. bitflags_associated_consts). This would allow nightly users to take advantage of the nicer API.

@tamird It seems like the `associated_const` feature will remain unstable for the near future. So it might make sense to pre-release this on crates.io as a separate crate (e.g. `bitflags_associated_consts`). This would allow nightly users to take advantage of the nicer API.
tamird commented 2017-03-13 15:20:23 -05:00 (Migrated from github.com)

This needs a rebase to pick up various changes made on master; I'll try to get to it this week.

This needs a rebase to pick up various changes made on master; I'll try to get to it this week.
tamird commented 2017-07-10 16:35:53 -05:00 (Migrated from github.com)

Rebased; probably won't pass until 1.20 is stable.

Rebased; probably won't pass until 1.20 is stable.
tamird commented 2017-08-19 22:40:58 -05:00 (Migrated from github.com)

Rebased again. Beyond the use of associated constants, this also uses compiletest, which requires nightly. Do we want to just remove the compile-fail test?

Rebased again. Beyond the use of associated constants, this also uses compiletest, which requires nightly. Do we want to just remove the compile-fail test?
alexcrichton commented 2017-08-22 10:01:21 -05:00 (Migrated from github.com)

The stable/beta builds seem to still be failing due to experimental features?

The stable/beta builds seem to still be failing due to experimental features?
tamird commented 2017-08-22 10:06:27 -05:00 (Migrated from github.com)

Yes, I believe that's because this PR adds a dependency on compiletest, which requires nightly (see my last comment). Should I just remove the compile-fail tests?

Yes, I believe that's because this PR adds a dependency on compiletest, which requires nightly (see my last comment). Should I just remove the compile-fail tests?
tamird commented 2017-08-31 18:56:37 -05:00 (Migrated from github.com)

Removed compiletest; lmk if you'd like me to squash the commits, but this should be green now.

Removed compiletest; lmk if you'd like me to squash the commits, but this should be green now.
sfackler commented 2017-09-04 12:55:42 -05:00 (Migrated from github.com)

r? @alexcrichton

r? @alexcrichton
alexcrichton commented 2017-09-05 09:50:49 -05:00 (Migrated from github.com)

👍

Thanks @tamird!

👍 Thanks @tamird!
Sign in to join this conversation.
No reviewers
No labels
bug
good first issue
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-bitflags/bitflags!24
No description provided.