about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-12-29 16:36:30 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-12-29 16:36:30 -0800
commitb1dec37561972c3e9e4026a8339722ebbef7384f (patch)
treee3bd6fb7094088fc79ab3e535f8b72e6c65c4e97 /src/libstd
parent9cbbfee8a4738663625e373f165b8ec5f6317ef4 (diff)
parentad39c0a8a19af23faa8c4f36daf33a0c02c3e0b9 (diff)
downloadrust-b1dec37561972c3e9e4026a8339722ebbef7384f.tar.gz
rust-b1dec37561972c3e9e4026a8339722ebbef7384f.zip
rollup merge of #20265: nicholasbishop/bishop_add_missing_bitflags_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.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/bitflags.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstd/bitflags.rs b/src/libstd/bitflags.rs
index 5dd76047779..a46b8a9ad90 100644
--- a/src/libstd/bitflags.rs
+++ b/src/libstd/bitflags.rs
@@ -104,6 +104,10 @@
 /// - `empty`: an empty set of flags
 /// - `all`: the set of all flags
 /// - `bits`: the raw value of the flags currently stored
+/// - `from_bits`: convert from underlying bit representation, unless that
+///                representation contains bits that do not correspond to a flag
+/// - `from_bits_truncate`: convert from underlying bit representation, dropping
+///                         any bits that do not correspond to flags
 /// - `is_empty`: `true` if no flags are currently stored
 /// - `is_all`: `true` if all flags are currently set
 /// - `intersects`: `true` if there are flags common to both `self` and `other`