329 Commits

Author SHA1 Message Date
Thom Chiovoloni a816290c93 Add named functions to perform set operations 2021-06-09 19:04:52 -07:00
Flier Lu 088e8a6195 add #[repr(transparent)] for the the FFI layout 2021-05-20 11:16:17 +08:00
Ashley Mannix fa572e95f4 Merge pull request #240 from KodrAus/fix/ci
Fix up CI Again
2021-05-18 14:57:40 +10:00
Ashley Mannix 520ab5d237 remove unneeded infra and dependence on compiler msgs 2021-05-16 20:08:13 +10:00
Ashley Mannix 1685621cf5 bump to 1.46.0 2021-05-16 16:05:05 +10:00
Ashley Mannix cd7d2c0470 update MSRV based on current impl 2021-05-16 16:00:43 +10:00
Ashley Mannix 7287d9ebd6 Merge pull request #211 from niklasf/is-all-extra-bits
Let is_all() ignore extra bits (fixes #208)
2021-05-16 15:35:42 +10:00
Ashley Mannix 60ed7fbeeb Merge pull request #225 from thiagoarrais/empty
Allows empty flag definition
2021-05-16 15:24:02 +10:00
Ashley Mannix c1c55e3453 Merge pull request #239 from ratijas/rename-u128
Rename i128 file & test to u128
2021-05-16 15:23:50 +10:00
Ashley Mannix e4213218bb Merge pull request #238 from ratijas/delet-travis
Remove remaining mentions of Travis CI
2021-05-16 15:23:41 +10:00
Ashley Mannix a9ae3b6400 Merge pull request #229 from bprosnitz/patch-1
Make from_bits a const fn
2021-05-11 11:03:18 +10:00
Ashley Mannix 6a03b95a46 Merge branch 'master' into empty 2021-05-11 11:01:55 +10:00
Ashley Mannix d553b816cb Merge pull request #235 from konsumlamm/multiple-bitflags
Allow multiple bitflags structs in one macro invocation
2021-05-11 10:57:45 +10:00
ivan tkachenko 564a594e41 Rename i128 file & test to u128 2021-05-09 18:28:19 +03:00
ivan tkachenko a323f3570b Remove remaining mentions of Travis CI
Badges section has been removed from crates.io; it is suggested to place
them in README instead[1], which we already have done.

In bors.toml, the status section. Its is unclear from the docs[2], what those
strings are. But it seems to me, they should reference name of GitHub
Workflow file with CI pipelines[3].

[1]: https://doc.rust-lang.org/cargo/reference/manifest.html#the-badges-section
[2]: https://bors.tech/documentation/
[3]: https://bors.tech/devdocs/bors-ng/readme.html
2021-05-09 18:12:50 +03:00
konsumlamm ddd1151cde Add test for bitflags! {} 2021-02-11 18:07:37 +01:00
Thiago Arrais 3c31f5fd7e Allows empty flag definition
Fixes #179
2021-01-12 09:53:55 -03:00
konsumlamm 3ad1b4e099 Allow multiple bitflags structs in one macro invocation
Change mentions of the `flags` keyword (used before 0.9) to `struct`
2020-12-27 14:23:54 +01:00
Ashley Mannix 78a8901383 Get CI green (#232) 2020-11-07 09:28:17 +10:00
Ashley Mannix 7970ce3af6 Migrate to github actions (#231) 2020-11-07 09:11:27 +10:00
Ashley Mannix 9a4bf946ab Merge pull request #227 from fortanix/raoul/rustc-dep-of-std
Making crate accessible from std
2020-11-07 08:59:39 +10:00
Raoul Strackx be8033c563 Fixed expected error message 2020-11-05 17:46:31 +01:00
Benjamin Prosnitz 9bd954bd9f Make from_bits a const fn
'if' now works in 'const fn as of rust 1.4.6 (https://blog.rust-lang.org/2020/08/27/Rust-1.46.0.html).

I would love to have 'from_bits' be a 'const fn' because it is the safest from_* function.
2020-10-19 16:58:51 -05:00
Raoul Strackx 39da084577 Making crate accessible from std 2020-10-12 16:51:45 +02:00
Niklas Fiekas 3f0b2e58c7 Let is_all() ignore extra bits (fixes #208) 2020-02-04 11:47:06 +01:00
Ashley Mannix a141374976 Merge pull request #207 from niklasf/unsafe-from-bits-unchecked
Document from_bits_unchecked unsafety (#200)
2020-01-28 11:51:36 +10:00
Niklas Fiekas 40c89c1b39 Document from_bits_unchecked unsafety (#200) 2020-01-22 16:15:53 +01:00
Peter Todd 15a2a772aa Fix typo (#206) 2020-01-01 14:32:36 +05:30
glts 0d8e9eb9d7 End empty doc comment with full stop (#202) 2019-12-03 17:22:44 +01:00
Ashley Mannix 0a8f167c3f Merge pull request #199 from eupn/use-trybuild
Use trybuild for compiletest
2019-11-05 19:39:18 +10:00
Evgenii Ponomarev 14e1da375c Use trybuild for compiletest
Closes #193.
2019-11-01 16:48:48 +08:00
Jacob Lifshay 5a0df55e15 update suggested bitflags version to 1.2 (#197)
Fixes #196
2019-10-23 14:09:47 +02:00
Ashley Mannix 71bd939054 Merge pull request #195 from varkor/1.2.1
Prepare for 1.2.1 release
2019-10-14 09:20:36 +10:00
varkor c1d163ec23 Update to 1.2.1 2019-10-13 15:38:06 +01:00
Ashley Mannix f9c3d90246 Merge pull request #194 from varkor/remove-inline-const
Remove `#[inline]` on consts
2019-10-12 12:10:57 +10:00
varkor a708b33223 Remove #[inline] on consts 2019-10-11 10:51:03 +01:00
Ashley Mannix f1ca24dfcf Merge pull request #192 from bitflags/ci/no-std-target
Check build on a no-std target
2019-10-09 22:35:24 +10:00
Ashley Mannix 0b068728a1 check build on a no-std target
only run compiletest on nightly
2019-10-09 22:24:50 +10:00
Ashley Mannix 8fb10d660f Merge pull request #190 from KodrAus/cargo/1.2.0
Prepare for 1.2.0 release
2019-09-24 12:08:10 +10:00
Ashley Mannix 5d281b0b28 don't run integration test suite on 1.20.0 2019-09-24 09:20:26 +10:00
Ashley Mannix 46e09e0528 prepare for 1.2.0 release 2019-09-23 13:21:36 +10:00
Ashley Mannix 2295547273 Merge pull request #188 from drmikehenry/unknown
Add support for "unknown" bits.
2019-09-23 13:18:23 +10:00
Michael Henry a8c30bf570 Adjust pull request based on feedback:
- Change `from_bits_unknown()` to the `unsafe` function
  `from_bits_unchecked()`.

- Eliminate unnecessary concept of "known" and "unknown" bits.
2019-08-03 09:11:18 -04:00
Michael Henry b0a1bc1de4 Add support for "unknown" bits.
This allows bitflags to be robustly used in cases where bit flags are
defined outside the program and are subject to extension after the
program has been compiled.  In such cases, the new function
`from_bits_unknown()` can create a bitflags structure where some of the
stored bits have no pre-defined meaning to the program; nevertheless,
the program can store and manipulate them successfully rather than
mis-behaving.
2019-07-27 12:06:26 -04:00
bors[bot] 7af480a1a4 Merge #186
186: fix up failing test and ensure it runs in CI r=KodrAus a=KodrAus

Closes #185 

We have a failing test on Windows that's been going unnoticed for a while, because we don't test Windows in CI.

This isn't a bug in `bitflags` itself, just one of its tests not being updated.

Co-authored-by: Ashley Mannix <ashleymannix@live.com.au>
2019-07-21 04:42:53 +00:00
Ashley Mannix 1fa79a8ade fix up unused item warning 2019-07-20 22:44:43 +10:00
Ashley Mannix fa6b794e7b fix up failing test and ensure it runs in CI 2019-07-20 22:41:17 +10:00
bors[bot] fc421441a7 Merge #183
183: Fix typo: {Lower, Upper}Exp - {Lower, Upper}Hex r=KodrAus a=Shadlock0133

Fixes #182

Co-authored-by: Shadlock0133 <tomek-kubel2@wp.pl>
2019-07-09 01:22:29 +00:00
Shadlock0133 193679b9bb Fix typo: {Lower, Upper}Exp - {Lower, Upper}Hex 2019-06-20 10:31:31 +02:00
bors[bot] b04e769c08 Merge #181
181: Prepare for 1.1.0 release r=KodrAus a=KodrAus

Closes #178

Now that #177 has been solved upstream in `1.35.0`, we can republish the `bitflags` that includes support for constant functions.

I opted to make this `1.1.0` rather than `1.0.6` since it's possible folks are still using older compilers that will break, and `1.0.5` probably should've been `1.1.0` anyways, since it was just fixing bugs.

Co-authored-by: Ashley Mannix <ashleymannix@live.com.au>
2019-06-06 00:25:12 +00:00