Commit Graph

285 Commits

Author SHA1 Message Date
Ashley Mannix 707be9dfec Merge pull request #187 from flier/repr_transparent
add #[repr(transparent)]
2021-07-19 10:37:02 +10:00
Ashley Mannix 8534293e20 Merge pull request #246 from konsumlamm/modernization
Modernization
2021-07-19 10:07:43 +10:00
Ashley Mannix 57f7a74123 Merge pull request #245 from konsumlamm/fix-typos
Fix typos
2021-07-19 10:03:54 +10:00
konsumlamm 19e763c468 Don't reexport core 2021-06-27 20:10:26 +02:00
konsumlamm 13e360c85b Modernize imports 2021-06-27 20:00:43 +02:00
konsumlamm f4e045ace1 Simplify bitflags! macro by using :vis 2021-06-27 17:53:48 +02:00
konsumlamm ce04f880db Fix typos 2021-06-26 21:42:01 +02: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