mirror of
https://gitee.com/openharmony/third_party_rust_bitflags
synced 2025-02-10 17:33:49 +00:00
prepare for 1.3.1 release
This commit is contained in:
parent
186af851e3
commit
7b722c6751
@ -1,4 +1,10 @@
|
||||
# 1.3.0
|
||||
# 1.3.1
|
||||
|
||||
- Revert unconditional `#[repr(transparent)]` ([#252])
|
||||
|
||||
[#252]: https://github.com/bitflags/bitflags/pull/252
|
||||
|
||||
# 1.3.0 (yanked)
|
||||
|
||||
- Add `#[repr(transparent)]` ([#187])
|
||||
|
||||
|
@ -3,7 +3,7 @@ name = "bitflags"
|
||||
# NB: When modifying, also modify:
|
||||
# 1. html_root_url in lib.rs
|
||||
# 2. number in readme (for breaking changes)
|
||||
version = "1.3.0"
|
||||
version = "1.3.1"
|
||||
edition = "2018"
|
||||
authors = ["The Rust Project Developers"]
|
||||
license = "MIT/Apache-2.0"
|
||||
|
20
src/lib.rs
20
src/lib.rs
@ -113,6 +113,24 @@
|
||||
//! Attributes can be attached to the generated `struct`s by placing them
|
||||
//! before the `struct` keyword.
|
||||
//!
|
||||
//! ## Representations
|
||||
//!
|
||||
//! It's valid to add a `#[repr(C)]` or `#[repr(transparent)]` attribute to a type
|
||||
//! generated by `bitflags!`. In these cases, the type is guaranteed to be a newtype.
|
||||
//!
|
||||
//! ```
|
||||
//! use bitflags::bitflags;
|
||||
//!
|
||||
//! bitflags! {
|
||||
//! #[repr(transparent)]
|
||||
//! struct Flags: u32 {
|
||||
//! const A = 0b00000001;
|
||||
//! const B = 0b00000010;
|
||||
//! const C = 0b00000100;
|
||||
//! }
|
||||
//! }
|
||||
//! ```
|
||||
//!
|
||||
//! # Trait implementations
|
||||
//!
|
||||
//! The `Copy`, `Clone`, `PartialEq`, `Eq`, `PartialOrd`, `Ord` and `Hash`
|
||||
@ -258,7 +276,7 @@
|
||||
//! Users should generally avoid defining a flag with a value of zero.
|
||||
|
||||
#![cfg_attr(not(test), no_std)]
|
||||
#![doc(html_root_url = "https://docs.rs/bitflags/1.3.0")]
|
||||
#![doc(html_root_url = "https://docs.rs/bitflags/1.3.1")]
|
||||
|
||||
#[doc(hidden)]
|
||||
pub extern crate core as _core;
|
||||
|
Loading…
x
Reference in New Issue
Block a user