about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-02-23 01:26:07 +0000
committerbors <bors@rust-lang.org>2022-02-23 01:26:07 +0000
commitbafe8d06e015eb00724d3d497516191d6681943f (patch)
tree3d9c51d1a63733cb3143141b5c54d75d826707e7 /compiler/rustc_data_structures/src
parent5bd1ec3283874b97b27da4539b2950fbd01c4b0e (diff)
parent36b495f3cf23a1f235482ce7f81f0f4be614bb85 (diff)
downloadrust-bafe8d06e015eb00724d3d497516191d6681943f.tar.gz
rust-bafe8d06e015eb00724d3d497516191d6681943f.zip
Auto merge of #93984 - nnethercote:ChunkedBitSet, r=Mark-Simulacrum
Introduce `ChunkedBitSet` and use it for some dataflow analyses.

This reduces peak memory usage significantly for some programs with very
large functions.

r? `@ghost`
Diffstat (limited to 'compiler/rustc_data_structures/src')
-rw-r--r--compiler/rustc_data_structures/src/lib.rs2
-rw-r--r--compiler/rustc_data_structures/src/macros.rs8
2 files changed, 2 insertions, 8 deletions
diff --git a/compiler/rustc_data_structures/src/lib.rs b/compiler/rustc_data_structures/src/lib.rs
index ea02a73c422..3e93fe9a11f 100644
--- a/compiler/rustc_data_structures/src/lib.rs
+++ b/compiler/rustc_data_structures/src/lib.rs
@@ -37,6 +37,8 @@ extern crate cfg_if;
 #[macro_use]
 extern crate rustc_macros;
 
+pub use rustc_index::static_assert_size;
+
 #[inline(never)]
 #[cold]
 pub fn cold_path<F: FnOnce() -> R, R>(f: F) -> R {
diff --git a/compiler/rustc_data_structures/src/macros.rs b/compiler/rustc_data_structures/src/macros.rs
index 48dfbba7504..e05491f6ff6 100644
--- a/compiler/rustc_data_structures/src/macros.rs
+++ b/compiler/rustc_data_structures/src/macros.rs
@@ -1,11 +1,3 @@
-/// Type size assertion. The first argument is a type and the second argument is its expected size.
-#[macro_export]
-macro_rules! static_assert_size {
-    ($ty:ty, $size:expr) => {
-        const _: [(); $size] = [(); ::std::mem::size_of::<$ty>()];
-    };
-}
-
 #[macro_export]
 macro_rules! enum_from_u32 {
     ($(#[$attr:meta])* pub enum $name:ident {