Skip to content

Commit

Permalink
Rollup merge of rust-lang#76963 - est31:remove_static_assert, r=oli-obk
Browse files Browse the repository at this point in the history
Remove unused static_assert macro
  • Loading branch information
RalfJung authored Sep 21, 2020
2 parents 9aba496 + c2dad1c commit e177757
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 e177757

Please sign in to comment.