Skip to content

Commit ad39c0a

Browse files
Update docstring for bitflags macro to cover all generated methods
The methods `from_bits` and `from_bits_truncate` were missing from the list of generated methods. Didn't see a useful way to abbreviate, so added with the same docstrings used in the macro definition.
1 parent 070ab63 commit ad39c0a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libstd/bitflags.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@
104104
/// - `empty`: an empty set of flags
105105
/// - `all`: the set of all flags
106106
/// - `bits`: the raw value of the flags currently stored
107+
/// - `from_bits`: convert from underlying bit representation, unless that
108+
/// representation contains bits that do not correspond to a flag
109+
/// - `from_bits_truncate`: convert from underlying bit representation, dropping
110+
/// any bits that do not correspond to flags
107111
/// - `is_empty`: `true` if no flags are currently stored
108112
/// - `is_all`: `true` if all flags are currently set
109113
/// - `intersects`: `true` if there are flags common to both `self` and `other`

0 commit comments

Comments
 (0)