Skip to content

Commit

Permalink
Remove unused static_assert macro
Browse files Browse the repository at this point in the history
  • Loading branch information
est31 committed Sep 20, 2020
1 parent 285fc7d commit c2dad1c
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions compiler/rustc_data_structures/src/macros.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
/// A simple static assertion macro.
#[macro_export]
#[allow_internal_unstable(type_ascription)]
macro_rules! static_assert {
($test:expr) => {
// Use the bool to access an array such that if the bool is false, the access
// is out-of-bounds.
#[allow(dead_code)]
const _: () = [()][!($test: bool) as usize];
};
}

/// Type size assertion. The first argument is a type and the second argument is its expected size.
#[macro_export]
macro_rules! static_assert_size {
Expand Down

0 comments on commit c2dad1c

Please sign in to comment.