about summary refs log tree commit diff
path: root/library/stdarch/crates/std_detect
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2019-09-17 17:02:45 +0200
committerLuca Barbato <lu_zero@gentoo.org>2019-09-17 19:22:18 +0200
commit33688eaa1048c9d2a13e2d53f9e9ff9727f1de0b (patch)
treea34de54efe08460c882e6c8041939ecfd31aedca /library/stdarch/crates/std_detect
parent6420fa4fb07a7aeab5fc57480bb6c3d619505539 (diff)
downloadrust-33688eaa1048c9d2a13e2d53f9e9ff9727f1de0b.tar.gz
rust-33688eaa1048c9d2a13e2d53f9e9ff9727f1de0b.zip
Remove the FIXME about the cache size checks
And leave a NOTE.
Diffstat (limited to 'library/stdarch/crates/std_detect')
-rw-r--r--library/stdarch/crates/std_detect/src/detect/cache.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/library/stdarch/crates/std_detect/src/detect/cache.rs b/library/stdarch/crates/std_detect/src/detect/cache.rs
index 1de4316b8f4..20f72b6fd46 100644
--- a/library/stdarch/crates/std_detect/src/detect/cache.rs
+++ b/library/stdarch/crates/std_detect/src/detect/cache.rs
@@ -43,13 +43,13 @@ impl Default for Initializer {
     }
 }
 
+// NOTE: the `debug_assert!` would catch that we do not add more Features than
+// the one fitting our cache.
 impl Initializer {
     /// Tests the `bit` of the cache.
     #[allow(dead_code)]
     #[inline]
     pub(crate) fn test(self, bit: u32) -> bool {
-        // FIXME: this way of making sure that the cache is large enough is
-        // brittle.
         debug_assert!(
             bit < CACHE_CAPACITY,
             "too many features, time to increase the cache size!"
@@ -60,8 +60,6 @@ impl Initializer {
     /// Sets the `bit` of the cache.
     #[inline]
     pub(crate) fn set(&mut self, bit: u32) {
-        // FIXME: this way of making sure that the cache is large enough is
-        // brittle.
         debug_assert!(
             bit < CACHE_CAPACITY,
             "too many features, time to increase the cache size!"
@@ -73,8 +71,6 @@ impl Initializer {
     /// Unsets the `bit` of the cache.
     #[inline]
     pub(crate) fn unset(&mut self, bit: u32) {
-        // FIXME: this way of making sure that the cache is large enough is
-        // brittle.
         debug_assert!(
             bit < CACHE_CAPACITY,
             "too many features, time to increase the cache size!"