diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2018-07-02 11:40:49 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2018-07-02 11:40:49 -0400 |
| commit | 78ea95258d6e3f603713ffde001334305044a4fb (patch) | |
| tree | ddf1e113feaecc1d5031f19a8ba993868671583d /src/librustc_data_structures | |
| parent | 73f8333e78e277353a1b69fbf605b9956a6c8ae5 (diff) | |
| download | rust-78ea95258d6e3f603713ffde001334305044a4fb.tar.gz rust-78ea95258d6e3f603713ffde001334305044a4fb.zip | |
improve comments
Diffstat (limited to 'src/librustc_data_structures')
| -rw-r--r-- | src/librustc_data_structures/indexed_set.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/librustc_data_structures/indexed_set.rs b/src/librustc_data_structures/indexed_set.rs index 30b87c0390a..2e95a45479c 100644 --- a/src/librustc_data_structures/indexed_set.rs +++ b/src/librustc_data_structures/indexed_set.rs @@ -239,14 +239,20 @@ impl<T: Idx> IdxSet<T> { self.words_mut().clone_from_slice(other.words()); } + /// Set `self = self | other` and return true if `self` changed + /// (i.e., if new bits were added). pub fn union(&mut self, other: &IdxSet<T>) -> bool { bitwise(self.words_mut(), other.words(), &Union) } + /// Set `self = self - other` and return true if `self` changed. + /// (i.e., if any bits were removed). pub fn subtract(&mut self, other: &IdxSet<T>) -> bool { bitwise(self.words_mut(), other.words(), &Subtract) } + /// Set `self = self & other` and return true if `self` changed. + /// (i.e., if any bits were removed). pub fn intersect(&mut self, other: &IdxSet<T>) -> bool { bitwise(self.words_mut(), other.words(), &Intersect) } |
