Files
meetingroom-netscreen/anti_lockscreen_rust/target/release/deps/libstatic_assertions-70a0e620d808c9e4.rmeta

178 lines
49 KiB
Plaintext
Raw Normal View History

rust
<EFBFBD><EFBFBD>Brustc 1.91.1 (ed61e7d7e 2025-11-07) (Rev1, Built by MSYS2 project)<29><02>0<>#`a<><61>i<EFBFBD>+<2B>F<EFBFBD>T8<-0a5677bcdbf6ca93<39><02>1<>-<2D>3<EFBFBD><33>%<25>:<3A><>R<>-0a51333fad0e7ace<63><01><02>_core<72>
assert_cfg<EFBFBD><01>assert_eq_align<67><01>assert_eq_size<7A><01>assert_eq_size_ptr<74>assert_eq_size_val<61> assert_fields<64> <01> assert_impl<70>assert_impl_one<6E>assert_impl_all<6C>assert_impl_any<6E>assert_not_impl_all<6C>assert_not_impl_any<6E>assert_obj_safe<66><01> assert_trait<69>assert_trait_sub_all<6C>assert_trait_super_all<6C> assert_type<70>assert_type_eq_all<6C>assert_type_ne_all<6C> const_assert<72><01>const_assert_eq<65>const_assert_ne<6E> <02><01>,<2C><01>T<> <01>|<7C><01>t<>  <01><02><>
<01><02><> <01>l<>
 <01>|<7C> <01>|<7C><01>|<7C>'<01><03><>H<01><03><>\<01>|<7C><01><04><>
<01><04><><01><04><> <01><04><><01>d<> <01>|<7C> <01>|<7C> <04><00><00><00><00> [![Banner](https://raw.githubusercontent.com/nvzqz/static-assertions-rs/assets/Banner.png)](https://github.com/nvzqz/static-assertions-rs)<29><1C><02>ē <div align="center"><3E><00><>=: <a href="https://crates.io/crates/static_assertions"><3E><00><>]Z <img src="https://img.shields.io/crates/d/static_assertions.svg" alt="Downloads"><3E>d<> </a><3E><00><>C@ <a href="https://travis-ci.org/nvzqz/static-assertions-rs"><3E><00><>mj <img src="https://travis-ci.org/nvzqz/static-assertions-rs.svg?branch=master" alt="Build Status"><3E>d<><01> <00><>[X <img src="https://img.shields.io/badge/rustc-^1.37.0-blue.svg" alt="rustc ^1.37.0"><3E><00><> <br><br><3E>T<> </div><3E><1C><02><00><>NK Assertions to ensure correct assumptions about constants, types, and more.<2E><1C><02><00><>MJ _All_ checks provided by this crate are performed at [compile-time]. This<69><00><>IF allows for finding errors quickly and early when it comes to ensuring<6E><00><>JG certain features or aspects of a codebase. These macros are especially<6C><00><>PM important when exposing a public API that requires types to be the same size<7A><00><>  or implement certain traits.<2E><1C><02>\<5C> # Usage<67><1C><02><00><>OL This crate is available [on crates.io][crate] and can be used by adding the<68><00><> /, following to your project's [`Cargo.toml`]:<3A><1C> <02>\<5C>  ```toml<6D><00><>  [dependencies]<5D><00><>  static_assertions = "1.1.0"<22><<3C>
 ```<60><1C>
<02><00><>
85 and this to your crate root (`main.rs` or `lib.rs`):<3A><1C>
<02><<3C>
<01><00><>
#[macro_use]<5D><00><>
# extern crate static_assertions;<3B><00><>  # fn main() {}<7D><<3C> <01><1C> <02><00><> MJ When using [Rust 2018 edition][2018], the following shorthand can help if<69><00><> )& having `#[macro_use]` is undesirable.<2E><1C> <02><00><>  ```edition2018<31><00><> )& extern crate static_assertions as sa;<3B><1C> <02><00><>  sa::const_assert!(true);<3B><<3C> <01><1C> <02>t<> # Examples<65><1C> <02><00><> 74 Very thorough examples are provided in the docs for<6F><00><> PM [each individual macro](#macros). Failure case examples are also documented.<2E><1C><02>l<>
# Changes<65><1C><02><00><>`] See [`CHANGELOG.md`](https://github.com/nvzqz/static-assertions-rs/blob/master/CHANGELOG.md)<29><00><>KH for an exhaustive list of what has changed from one version to another.<2E><1C><02>d<> # Donate<74><1C><02><00><>NK This project is made freely available (as in free beer), but unfortunately<6C><00><>NK not all beer is free! So, if you would like to buy me a beer (or coffee or<6F><00><>KH *more*), then consider supporting my work that's benefited your project<63><00><> and thousands of others.<2E><1C><02><00><>,) <a href="https://www.patreon.com/nvzqz"><3E><00><>vs <img src="https://c5.patreon.com/external/logo/become_a_patron_button.png" alt="Become a Patron!" height="35"><3E>D<> </a><3E><00><>*' <a href="https://www.paypal.me/nvzqz"><3E><00><>nk <img src="https://buymecoffee.intm.org/img/button-paypal-white.png" alt="Buy me a coffee" height="35"><3E>D<><01><1C><02><00><>GD [Rust 1.37]: https://blog.rust-lang.org/2019/08/15/Rust-1.37.0.html<6D><00><>XU [2018]: https://blog.rust-lang.org/2018/12/06/Rust-1.31-and-rust-2018.html#rust-2018<31><00><>74 [crate]: https://crates.io/crates/static_assertions<6E><00><>>; [compile-time]: https://en.wikipedia.org/wiki/Compile_time<6D><00><>KH [`Cargo.toml`]: https://doc.rust-lang.org/cargo/reference/manifest.html<6D><02><1C> <0C> <0C>8<02>l<> <0C>7'https://docs.rs/static_assertions/1.1.0<EFBFBD><00><>)<01><>B<02><1C> <0C> <0C>8<02>l<> <0C>7Lhttps://raw.githubusercontent.com/nvzqz/static-assertions-rs/assets/Icon.png<6E><00><>N<01><>g <02><13><01><13><01><01><01>" <01>1
<01>@ <01>O <01>^<01>m<01>|<01><13><01><13><01><13><01><13><01><13><01><13><01><13><01><13><01><01><04><><13>t<>T<><00><> <00>.+ Asserts that a given configuration is set.<2E>/<02>t3<01>B<02><00>FPM A project will simply fail to compile if the given configuration is not set.<2E><1C><02><<3C><01><00><>?< # #[macro_use] extern crate static_assertions; fn main() {}<7D><00><> // We're not masochists<74><00><>>; # #[cfg(not(target_pointer_width = "16"))] // Just in case<73><00><>2/ assert_cfg!(not(target_pointer_width = "16"));<3B><<3C><01><1C><02><00><>JG If a project does not support a set of configurations, you may want to<74><00><>PM report why. There is the option of providing a compile error message string:<3A><1C><02><<3C><01><00><>?<01>*<00><>  # #[cfg(any(unix, windows))]<5D><00><>QN assert_cfg!(any(unix, windows), "There is only support for Unix or Windows");<3B><1C><02><00><>0- // User needs to specify a database back-end<6E><00><>63 # #[cfg(target_pointer_width = "0")] // Impossible<6C><00><>EB assert_cfg!(all(not(all(feature = "mysql", feature = "mongodb")),<2C><00><>EB any( feature = "mysql", feature = "mongodb")),<2C><00><>NK "Must exclusively use MySQL or MongoDB as database back-end");<3B><<3C><01><1C><02><00><>NK Some configurations are impossible. For example, we can't be compiling for<6F><00><>,) both macOS _and_ Windows simultaneously:<3A><1C> <02><00><>  ```compile_fail<69><00><> ?<01>*<00><> (% assert_cfg!(all(target_os = "macos",<2C><00><>
+( target_os = "windows"),<2C><00><>
85 "No, that's not how it works! ಠ_ಠ");<3B><<3C> <01><02> d<> |<7C>  <0C>  <0C>   <0C>  <0C> *<14>  <0C>  <0C> % <0C>  <0C>  <0C>  , <0C>  <0C>  <0C> , <0C> 8<02><1C> & <0C> 8<02>
$<24>  <0C> $ <0C> , <0C> 8msg<73><1C> & <0C> 8<02>$<24> , <0C>  <0C>  <0C> $ <0C> - <0C> *<14>  <0C>  <0C> + <0C>  <0C>  <0C> 8<02><1C>  <0C>  <0C> 8<02> <1C>  <0C>  <0C> , <0C>  <0C>  <0C> , <0C> 8<02><1C>  <0C> 8<02>l<>  <0C>  <0C>  <0C> , <0C> 8<01>6<1C> % <0C> % <0C>  <0C>  <0C> , <0C>  <0C>  <0C> , <0C> 8<02><1C> & <0C> 8<02><14>  <0C> *<14>  <0C>  <0C> + <0C>  <0C>  <0C> 8<02><1C>  <0C>  <0C> 8<02> <1C>  <0C>  <0C> , <0C>  <0C>  <0C> , <0C> 8<02><1C>  <0C> 8<02>l<>  <0C>  <0C>  <0C> 8<02>4<>  <0C>  <0C>  <0C> 7Cfg does not pass: <20><00><> $ <0C> 8<02>L<>  <0C>  <0C>  <0C> , <0C>  <0C>  <0C> , <0C> 8<02><1C>  <0C> % <0C> % <0C> <00><>|<7C><00><><00>.+ Asserts that types are equal in alignment.<2E>/<02><00>3NK This is useful when ensuring that pointer arithmetic is done correctly, or<6F><00><>OL when [FFI] requires a type to have the same alignment as some foreign type.<2E><1C><02>t<><01><1C><02><00><>96 A `usize` has the same alignment as any pointer type:<3A><1C><02><<3C><01><00><>?<01>*<00><>0- assert_eq_align!(usize, *const u8, *mut u8);<3B><<3C><01><1C><02><00><>LI The following passes because `[i32; 4]` has the same alignment as `i32`:<3A><1C><02><<3C><01><00><>?<01>*<00><>$! assert_eq_align!([i32; 4], i32);<3B><<3C><01><1C><02><00><>KH The following example fails to compile because `i32x4` explicitly has 4<><00><>&# times the alignment as `[i32; 4]`:<3A><1C><02><00><><01>3<00><>?<01>*<00><>$! # #[allow(non_camel_case_types)]<5D><00><> #[repr(align(16))]<5D><00><> struct i32x4([i32; 4]);<3B><1C><02><00><>&# assert_eq_align!(i32x4, [i32; 4]);<3B><<3C><01><1C><02><00><>C@ [FFI]: https://en.wikipedia.org/wiki/Foreign_function_interface<63><02> d<>|<7C> <0C> <0C>
 <0C> <0C> , <0C>8x<> <0C>& <0C>8<02><14>$ <0C>, <0C> <0C> <0C>, <0C>8xs<78><14>& <0C>8<02><14>$ <0C> <0C>, <0C> <0C> <0C>$ <0C>- <0C>*<14> <0C> <0C>
 8,<2C>8 <0C>& <0C>8 <14> <0C> <0C> <0C><14> <0C>  <0C>
 8#<1C> , <0C>
8,<2C>
'<14>
8<01>,<2C>
'<14>
8mem<65><1C>
'<14>
8<02>D<>
% <0C>
, <0C>
 <0C>
 <0C>
8<1C>
8 <0C>
& <0C>
 <0C>
 <0C>
  <0C>
 <0C>
% <0C>
8<02>D<>
'<14>
 <0C>
, <0C>
8<01>D <0C>
 <0C>
 <0C>
 <0C>
 <0C>
 <0C>
 <0C>
  <0C>
 <0C>
% <0C>
8<02>D<>
'<14>
 <0C>
, <0C>
8<01>D<14>
 <0C>
 <0C>
 <0C>
% <0C>
 <0C>
% <0C>
% <0C>
<00><>t<>ܐ <00>)& Asserts that types are equal in size.<2E>*<02><00>.NK When performing operations such as pointer casts or dealing with [`usize`]<5D><00>}OL versus [`u64`] versus [`u32`], the size of your types matter. That is where<72><00><> this macro comes into play.<2E><1C><02><00><> # Alternatives<65><1C><02><00><>OL There also exists [`assert_eq_size_val`](macro.assert_eq_size_val.html) and<6E><00><>PM [`assert_eq_size_ptr`](macro.assert_eq_size_ptr.html). Instead of specifying<6E><00><>PM types to compare, values' sizes can be directly compared against each other.<2E><1C><02>t<><01><1C><02><00><>LI These three types, despite being very different, all have the same size:<3A><1C><02><<3C><01><00><>?<01>*<00><>.+ assert_eq_size!([u8; 4], (u16, u16), u32);<3B><<3C><01><1C><02><00><>PM The following example fails to compile because `u32` has 4 times the size of<6F>L<> `u8`:<3A><1C><02><00><><01>3<00><>?<01>*<00><> assert_eq_size!(u32, u8);<3B><<3C><01><1C><02><00><>A> [`usize`]: https://doc.rust-lang.org/std/primitive.usize.html<6D><00><>=: [`u64`]: https://doc.rust-lang.org/std/primitive.u64.html<6D><00><>=: [`u32`]: https://doc.rust-lang.org/std/primitive.u32.html<6D><02> d<> |<7C> " <0C>  <0C>
 <0C>  <0C>  , <0C> 8<01>D <0C> & <0C> 8<02><14> $ <0C> , <0C>  <0C>  <0C> , <0C> 8<01>D<14> & <0C> 8<02><14> $ <0C>  <0C> , <0C>  <0C>  <0C> $ <0C> - <0C> *<14>  <0C>  <0C>
 8,<2C> 8 <0C> & <0C> 8 <14>  <0C>  <0C>  <0C> <14>  <0C>  <0C>
, <0C>  <0C>  <0C>
8<1C> 8 <0C>
 <0C>
, <0C>
8,<2C>
'<14>
8<01>,<2C>
'<14>
8<01>F<1C>
'<14>
8<02>L<>
'<14>
 <0C>
, <0C>
8<01>D <0C>
$ <0C>
, <0C>
8<01>D<14>
 <0C>
% <0C>
 <0C>
% <0C>
% <0C>
<00><><00><>
52 Asserts that values pointed to are equal in size.<2E><1C>
<02>t<> <01><1C> <02><00><> PM This especially is useful for when coercing pointers between different types<65><00><> 96 and ensuring the underlying values are the same size.<2E><1C> <02><<3C> <01><00><> ?<01>*<00><> 0- fn operation(x: &(u32, u32), y: &[u16; 4]) {<7B><00><> " assert_eq_size_ptr!(x, y);<3B>t<>  // ...<2E>,<2C>  }<7D><<3C> <01><1C> <02><00><> KH The following example fails to compile because byte arrays of different<6E><00><>! lengths have different sizes:<3A><1C><02><00><><01>3<00><>2/ # #[macro_use] extern crate static_assertions;<3B><00><> # fn main() {<7B><00><> static BYTES: &[u8; 4] = &[<5B><00><> /* ... */<2F>t<> # 0; 4<>4<> ];<3B><1C><02><00><>  static TABLE: &[u8; 16] = &[<5B><00><><01>\|<7C> # 0; 16<31>4<><01>\<1C><02><00><>&# assert_eq_size_ptr!(BYTES, TABLE);<3B><<3C><01><02> d<>|<7C>1 <0C> <0C> <0C> <0C> , <0C>8<01>D <0C>& <0C>8<02>$<24>$ <0C>, <0C> <0C> <0C>, <0C>8<01>D<14>& <0C>8<02>$<24>$ <0C> <0C>, <0C> <0C> <0C>$ <0C>- <0C>*<14> <0C> <0C> + <0C> <0C> <0C>8<02>,<2C> <0C> <0C>8 unknown_lints<74>l<>$ <0C>8 unsafe_code<64>\<5C>$ <0C>8 forget_copy<70>\<5C>$ <0C>8useless_transmute<74><00><>8<1C>8 <0C> <0C><14>8"4<> <0C> <0C>8#<1C>, <0C>8,<2C>'<14>8<01>,<2C>'<14> <0C> <0C>8<01>F<1C>$ <0C>8<02> <1C>% <0C>8<1C>8<1C>8<02>$<24> <0C>8<02> <1C>'<14>8read<61>$<24> <0C> <0C>, <0C>8<01>D <0C>% <0C>, <0C> <0C> <0C>8<02> <1C>'<14>8write<74>,<2C> <0C> <0C> <0C>8<1C>8<02>$<24>$ <0C>8<01>F<1C>'<14>8<02>L<> <0C> <0C>8<02> <1C>'<14>8<01>b$<24> <0C> <0C>, <0C>8<01>D<14>% <0C> <0C>8<01>F<1C>'<14>8<02>4<> <0C> <0C>8<02>$<24>% <0C>% <0C><00><><00><>*' Asserts that values are equal in size.<2E><1C><02><00><>?< This macro doesn't consume its arguments and thus works for<6F><00><> non-[`Clone`]able values.<2E><1C><02>t<><01><1C><02><<3C><01><00><>2<01>[<00><><01>[<00><> struct Byte(u8);<3B><1C><02><00><> let x = 10u8;<3B><00><>63 let y = Byte(42); // Works for non-cloneable types<65><1C><02><00><> assert_eq_size_val!(x, y);<3B><00><># assert_eq_size_val!(x, y, 0u8);<3B><<3C> # }<7D><<3C><01><1C><02><00><>JG Even though both values are 0, they are of types with different sizes:<3A><1C><02><00><><01>3<00><>2<01>[<00><><01>[<00><># assert_eq_size_val!(0u8, 0u32);<3B><<3C><01>h<<3C><01><1C><02><00><>C@ [`Clone`]: https://doc.rust-lang.org/std/clone/trait.Clone.html<6D><02> d<> <0C> <0C>8<02> <00><><00><>#@ <0C> <0C> <0C> <0C> , <0C>8<01>D <0C>& <0C>8<02>$<24>$ <0C>, <0C> <0C> <0C>, <0C>8<01>D<14>& <0C>8<02>$<24>$ <0C> <0C>, <0C> <0C> <0C>$ <0C>- <0C>*<14> <0C> <0C>8<01><00><> <0C> <0C> <0C> <0C>, <0C>8<01>D <0C>$ <0C>, <0C> <0C> <0C> <0C>, <0C>8<01>D<14>$ <0C> <0C>% <0C><00><>l<>Ԁ
<00>/, Asserts that the type has the given fields.<2E>0<02>t4<01>C<02><00>GMJ One common use case is when types have fields defined multiple times as a<><00><>HE result of `#[cfg]`. This can be an issue when exposing a public API.<2E><1C><02><<3C><01><00><>2<01>[<00><> pub struct Ty {<7B><00><> #[cfg(windows)]<5D><00><> pub val1: u8,<2C><00><> #[cfg(not(windows))]<5D><00><> pub val1: usize,<2C><1C><02><00><> #[cfg(unix)]<5D><00><> pub val2: u32,<2C><00><> #[cfg(not(unix))]<5D><00><> pub val2: usize,<2C>,<2C><01>Y<1C><02><00><>*' // Always have `val2` regardless of OS<4F><00><> assert_fields!(Ty: val2);<3B><<3C><01><1C><02><00><>/, This macro even works with `enum` variants:<3A><1C><02><<3C><01><00><>?<01>*|<7C> enum Data {<7B>l<>
Val {<7B><00><> id: i32,<2C>̆ name: String,<2C><00><> bytes: [u8; 128],<2C>T<> },<2C><00><> Ptr(*const u8),<2C>,<2C><01>Y<1C><02><00><>)& assert_fields!(Data::Val: id, bytes);<3B><<3C><01><1C><02><00><>b_ The following example fails to compile because [`Range`] does not have a field named `middle`:<3A><1C><02><00><><01>3<00><>?<01>*<00><> use std::ops::Range;<3B><1C><02><00><>'$ assert_fields!(Range<u32>: middle);<3B><<3C> <01><1C> <02><00><> B? [`Range`]: https://doc.rust-lang.org/std/ops/struct.Range.html<6D><02> d<> |<7C> O <0C>
 <0C> <0C>
 <0C>
, <0C>
8t<> <0C>
& <0C>
8<02>,<2C>
'<14>
, <0C>
8v<> <0C>
& <0C>
8<02>,<2C>
& <0C>
, <0C>
 <0C>
 <0C>
, <0C>
8<02> <0C>
& <0C>
8<02>,<2C>
$ <0C>
 <0C>
*<14>
 <0C>
 <0C>  + <0C>
 <0C>
 <0C> 8<02>,<2C>
 <0C>
 <0C>
8<01>_l<>
$ <0C>
8unneeded_field_pattern<72><00><>
8,<2C> 8 <0C> & <0C> 8 <14>  <0C>  <0C>  <0C> <14>  <0C>  <0C> + <0C>  <0C>  <0C> 8<02>,<2C>  <0C>  <0C> 8<02>L<> $ <0C> 8unreachable_patterns<6E><00><> 8 <14> 8<02>4<>  <0C>  <0C> 8<02>,<2C> & <0C> , <0C> 8<01>y <0C>  <0C>  <0C> 8,<2C> 8<02>,<2C>  <0C>  <0C> , <0C>  <0C>  <0C>  , <0C> 8<01>y <0C> '<14> , <0C> 8<01>y <0C>  <0C>  <0C> , <0C> 8<02> <0C> & <0C> 8 <0C> $ <0C> !<14> *<14>  <0C>  <0C> $ <0C>  <0C> 8 <0C> *<14>  <0C>  <0C> % <0C> % <0C>  <0C>  <0C>  , <0C> 8<01>y <0C> & <0C> 8<02> $<24> & <0C> , <0C>  <0C>  <0C> , <0C> 8<02> <0C> & <0C> 8<02>,<2C> $ <0C>  <0C> *<14>  <0C>  <0C> + <0C>  <0C>  <0C> 8<02>,<2C>  <0C>  <0C> 8<01>_l<> $ <0C> 8<01>{<00><> 8,<2C> 8 <0C>& <0C>8 <14> <0C> <0C> <0C><14> <0C> <0C>, <0C> <0C> <0C>8<1C>, <0C>8<01>y <0C> <0C> <0C>, <0C>8<02> <0C>& <0C>8 <0C>$ <0C>!<14>% <0C> <0C>% <0C>% <0C>|<7C>\<5C><00><> <00>DA Asserts that the type implements exactly one in a set of traits.<2E>E<02>dI Related:<3A><00>V - [`assert_impl_any!`]<5D><00>q - [`assert_impl_all!`]<5D><00><> - [`assert_not_impl_all!`]<5D><00><> - [`assert_not_impl_any!`]<5D><1C><02>t<><01><1C><02><00><>PM Given some type `Foo`, it is expected to implement either `Snap`, `Crackle`,<2C>l<>
or `Pop`:<3A><1C><02><00><><01>3<00><>:7 # use static_assertions::assert_impl_one; fn main() {}<7D>|<7C> struct Foo;<3B><1C><02><00><> trait Snap {}<7D><00><> trait Crackle {}<7D><00><> trait Pop {}<7D><1C><02><00><>.+ assert_impl_one!(Foo: Snap, Crackle, Pop);<3B><<3C><01><1C><02><00><>=: If _only_ `Crackle` is implemented, the assertion passes:<3A><1C><02><<3C><01><00><>:<01><><00><> # struct Foo;<3B><00><> # trait Snap {}<7D><00><> # trait Crackle {}<7D><00><> # trait Pop {}<7D><00><> impl Crackle for Foo {}<7D><1C><02><00><>.؇<<3C><01><1C><02><00><>B? If `Snap` or `Pop` is _also_ implemented, the assertion fails:<3A><1C><02><00><><01>3<00><>:<01><><00><><01><><00><><01><><00><><01><><00><>߉<00><> # impl Crackle for Foo {}<7D><00><> impl Pop for Foo {}<7D><1C><02><00><>.؇<<3C> <01><1C> <02><00><> 85 [`assert_impl_any!`]: macro.assert_impl_any.html<6D><00><> 85 [`assert_impl_all!`]: macro.assert_impl_all.html<6D><00><>
<9 [`assert_not_impl_all!`]: macro.assert_not_impl_all.html<6D><00><>
<9 [`assert_not_impl_any!`]: macro.assert_not_impl_any.html<6D><02> d<> |<7C> ^ <0C>  <0C> <0C>  <0C>  , <0C> 8<01>D <0C> & <0C> 8<02><14> & <0C> , <0C>  <0C>  <0C> , <0C> 8<01>y <0C> & <0C> 8<02> $<24> $ <0C>  <0C> , <0C>  <0C>  <0C> $ <0C> - <0C> *<14>  <0C>  <0C> 8,<2C> 8 <0C> & <0C> 8 <14>  <0C>  <0C>  <0C> <14>  <0C>  <0C>8,<2C> 8AmbiguousIfMoreThanOne<6E><00><>  <0C> 8A<> <0C>  <0C>  <0C>  <0C> 8 <14> 8 some_item<65>L<>  <0C>  <0C>  <0C>  <0C> , <0C> <0C> <0C> <0C> <0C>+ <0C> <0C> <0C>8<02>,<2C> <0C> <0C>8<02>L<>84<>8Token<65>,<2C>% <0C>8$<24> <0C>8<02> <0C>& <0C>- <0C>8<02>,<2C> <0C>, <0C>8<01>y <0C> <0C>8<01><><00><> <0C>8<01><>,<2C> <0C>8 <1C>8<02> <0C> <0C> <0C> <0C>8<1C>8 <0C> <0C> <0C>, <0C>8<01>D <0C>8<14>8<01><><00><> <0C>8 <0C><14>'<14>8ܑL<>% <0C>% <0C>% <0C><00><><00><>?< Asserts that the type implements _all_ of the given traits.<2E><1C><02><00><>C@ See [`assert_not_impl_all!`] for achieving the opposite effect.<2E><1C><02>t<><01><1C><02><00><>OL This can be used to ensure types implement auto traits such as [`Send`] and<6E><00><>@= [`Sync`], as well as traits with [blanket `impl`s][blanket].<2E><1C><02><<3C><01><00><>?<01>*<00><>&# assert_impl_all!(u32: Copy, Send);<3B><00><>)& assert_impl_all!(&str: Into<String>);<3B><<3C><01><1C><02><00><>PM The following example fails to compile because raw pointers do not implement<6E><00><>?< [`Send`] since they cannot be moved between threads safely:<3A><1C><02><00><><01>3<00><>?<01>*<00><>&# assert_impl_all!(*const u8: Send);<3B><<3C><01><1C><02><00><><ݍ<00><>B? [`Send`]: https://doc.rust-lang.org/std/marker/trait.Send.html<6D><00><>B? [`Sync`]: https://doc.rust-lang.org/std/marker/trait.Sync.html<6D><00><>wt [blanket]: https://doc.rust-lang.org/book/ch10-02-traits.html#using-trait-bounds-to-conditionally-implement-methods<64><02> d<>|<7C>m <0C> <0C> <0C> <0C> , <0C>8!$<24>& <0C>8<02><14>& <0C>, <0C> <0C> <0C>, <0C>8,<2C>& <0C>8<02> $<24>$ <0C> <0C>, <0C> <0C> <0C>$ <0C>- <0C>*<14> <0C> <0C> 8,<2C>8 <0C>& <0C>8 <14> <0C> <0C> <0C><14> <0C> <0C>8 <14>8<01>|<7C> <0C>8<02> <0C>& <0C>- <0C>8<02>,<2C>, <0C> <0C> <0C> <0C>, <0C>8,<2C> <0C> <0C> <0C> <0C> <0C> <0C>8<01>|<7C>'<14> <0C>, <0C>8!$<24> <0C> <0C> <0C>% <0C>% <0C>% <0C><00><>'<00><>?< Asserts that the type implements _any_ of the given traits.<2E><1C><02><00><>C@ See [`assert_not_impl_any!`] for achieving the opposite effect.<2E><1C><02>t<><01><1C> <02><00><> LI `u8` cannot be converted from `u16`, but it can be converted into `u16`:<3A><1C> <02><<3C> <01><00><> ?<01>*<00><>!/, assert_impl_any!(u8: From<u16>, Into<u16>);<3B><<3C>!<01><1C>!<02><00><>!OL The unit type cannot be converted from `u8` or `u16`, but it does implement<6E>l<>"
[`Send`]:<3A><1C>"<02><<3C>"<01><00><>"?<01>*<00><>#41 assert_impl_any!((): From<u8>, From<u16>, Send);<3B><<3C>#<01><1C>#<02><00><>#P<01><><00><>$MJ [`Send`] or [`Sync`] since they cannot be moved or shared between threads<64>\<5C>$ safely:<3A><1C>$<02><00><>$<01>3<00><>%?<01>*<00><>%,) assert_impl_any!(*const u8: Send, Sync);<3B><<3C>%<01><1C>%<02><00><>&<<01><><00><>&B˛<00><>'B<01><><02> d<>'|<7C>'| <0C>' <0C>: <0C>' <0C>( , <0C>'8<01>D <0C>'& <0C>'8<02><14>'& <0C>', <0C>( <0C>( <0C>(, <0C>(8<01>y <0C>(& <0C>(8<02> $<24>($ <0C>( <0C>(, <0C>( <0C>( <0C>($ <0C>(- <0C>(*<14>( <0C>( <0C>: 8,<2C>(8 <0C>(& <0C>(8 <14>( <0C>( <0C>( <0C>(<14>( <0C>( <0C>:68#<1C>(, <0C>(8,<2C>('<14>(8<01>,<2C>('<14>(8<02> 4<>('<14>(8 PhantomData<74>\<5C>(% <0C>(8#<1C>(, <0C>(8,<2C>('<14>)8<01>,<2C>)'<14>)8<02> <1C>)'<14>)8<02>,<2C>)% <0C>)8<1C>)8previous<75>D<>) <0C>)8AssertImplAnyFallback<63><00><>*% <0C>*84<>*8Ӭ<00><>*% <0C>*84<>-8ActualAssertImplAnyToken<65><00><>-% <0C>-8,<2C>.8AssertImplAnyToken<65><00><>. <0C>. <0C>.8$<24>.8խ<00><>.8 <1C>.8<01><><00><>. <0C>. <0C>.8 <14>.8assert_impl_any_token<65><00><>. <0C>/8<02> <0C>/& <0C>/8խ<00><>/ <0C>/ <0C>/ <0C>/8 <0C>/& <0C>/8<02> <0C>/ <0C>/ <0C>/, <0C>/ <0C>/ <0C>78<1C>/8<01><>D<>/ <0C>/ <0C>/ <0C>7184<>/8<02><<3C>/ <0C>/8<02> <0C>/$ <0C>/8<02> <0C>/ <0C>/ <0C>/ <0C>08<01><>\<5C>/ <0C>/8<02> <0C>0 <0C>0$ <0C>08<02> <0C>0% <0C>08$<24>1 <0C>18<02> <0C>1$ <0C>18<02> <0C>2 <0C>28<02>,<2C>28 <1C>28<02><<3C>2 <0C>28<02> <0C>2$ <0C>28<02> <0C>2 <0C>2 <0C>2 <0C>38!$<24>28<02>4<>2 <0C>28<02> <0C>2% <0C>28 <14>28<02>,<2C>2 <0C>2 <0C>2 <0C>28$<24>2(<14>2 <0C>28$<24>2'<14>28<02>4<>2 <0C>2 <0C>3 <0C>38$<24>3 <0C>37<02> <0C>38$<24>5 <0C>58<02> <0C>5& <0C>5, <0C>58<01>y <0C>5$ <0C>58<02> <0C>5 <0C>58<02><<3C>5 <0C>58<02> <0C>5$ <0C>58<02> <0C>5 <0C>5 <0C>5 <0C>68 <14>58_static_assertions_impl_any<6E><00><>5 <0C>5 <0C>6 <0C>58$<24>5(<14>68<01><>ć6 <0C>6 <0C>68<01><>ĺ68<02><<3C>7'<14>7 <0C>7, <0C>78<01>D <0C>7$ <0C>78 <0C>7 <0C>7 <0C>7 <0C>78<01><>\<5C>7$ <0C>78<01><>D<>7% <0C>7 <0C>78®<00><>9 <0C>9 <0C>:8<01><>D<>9 <0C>98<01><><00><>9 <0C>: <0C>:% <0C>:% <0C>:% <0C>:<00><>H <00><>:KH Asserts that the type does **not** implement _all_ of the given traits.<2E><1C>:<02><00><>;IF This can be used to ensure types do not implement auto traits such as<61><00><>;MJ [`Send`] and [`Sync`], as well as traits with [blanket `impl`s][blanket].<2E><1C><<02><00><><JG Note that the combination of all provided traits is required to not be<62><00><><FC implemented. If you want to check that none of multiple traits are<72><00><>=C@ implemented you should invoke [`assert_not_impl_any!`] instead.<2E><1C>=<02>t<>=<01><1C>><02><00><>>OL Although `u32` implements `From<u16>`, it does not implement `Into<usize>`:<3A><1C>><02><<3C>><01><00><>>?<01>*<00><>?63 assert_not_impl_all!(u32: From<u16>, Into<usize>);<3B><<3C>?<01><1C>?<02><00><>?LI The following example fails to compile since `u32` can be converted into<74>T<>@ `u64`.<2E><1C>@<02><00><>@<01>3<00><>@?<01>*<00><>A)& assert_not_impl_all!(u32: Into<u64>);<3B><<3C>A<01><1C>A<02><00><>APM The following compiles because [`Cell`] is not both [`Sync`] _and_ [`Send`]:<3A><1C>B<02><<3C>B<01><00><>B?<01>*<00><>B use std::cell::Cell;<3B><1C>C<02><00><>C0- assert_not_impl_all!(Cell<u32>: Sync, Send);<3B><<3C>C<01><1C>C<02><00><>C1. But it is [`Send`], so this fails to compile:<3A><1C>C<02><00><>C<01>3<00><>D?<01>*<00><>D # std::cell::Cell;<3B><00><>D*' assert_not_impl_all!(Cell<u32>: Send);<3B><<3C>E<01><1C>E<02><00><>EB˛<00><>EB<01><><00><>F<<01><><00><>FA> [`Cell`]: https://doc.rust-lang.org/std/cell/struct.Cell.html<6D><00><>Gw<01><><02> d<>H|<7C>H<13> <0C>H <0C>O <0C>H <0C>H , <0C>H8<01>D <0C>H& <0C>H8<02><14>H& <0C>H, <0C>H <0C>H <0C>H, <0C>H8<01>y <0C>H& <0C>H8<02> $<24>H$ <0C>H <0C>H, <0C>H <0C>H <0C>H$ <0C>H- <0C>H*<14>H <0C>H <0C>O 8,<2C>H8 <0C>I& <0C>I8 <14>I <0C>I <0C>I <0C>I<14>I
 between threads safely:<3A><1C>
<02><00><>
<01>3<00><> ?<01>*<00><> " assert_impl!(*const u8, Send);<3B><<3C> <01><1C> <02><00><> C@ The following example fails to compile because generics without<75><00><> OL `where Self: Sized` are not allowed in [object-safe][object] trait methods:<3A><1C> <02><00><> <01>3<00><> ?<01>*<00><>  trait MyUnsafeTrait {<7B><00><>  fn baz<T>(&self) -> T;<3B>,<2C><01>Y<1C><02><00><>$! assert_obj_safe!(MyUnsafeTrait);<3B><<3C><01><1C><02><00><>52 When we fix that, the previous code will compile:<3A><1C><02><<3C><01><00><>?<01>*<00><><01><><00><>0- fn baz<T>(&self) -> T where Self: Sized;<3B>,<2C><01>Y<1C><02><00><>$<01><><<3C><01><1C><02><00><>sp [object]: https://doc.rust-lang.org/book/ch17-02-trait-objects.html#object-safety-is-required-for-trait-objects<74><02> d<>|<7C><13> <0C> <0C> <0C> <0C>, <0C> <0C> <0C>, <0C>8<01>D<14>& <0C>8<02> $<24>$ <0C> <0C>, <0C> <0C> <0C>$ <0C>- <0C>*<14> <0C> <0C>, <0C> <0C> <0C> 8,<2C>8 <0C>& <0C>8<02>4<> <0C> <0C>, <0C>8<01>D<14> <0C> <0C>8<02>$<24>% <0C> <0C>% <0C><00><>d<><00><>
!<00>A> Asserts that the trait is a child of all of the other traits.<2E>B<02>dFӃ<00>S! - [`assert_trait_super_all!`]<5D>u<02>ty<01><1C><02><00><>?< All types that implement [`Copy`] must implement [`Clone`]:<3A><1C><02><<3C><01><00><>?<01>*<00><>'$ assert_trait_sub_all!(Copy: Clone);<3B><<3C><01><1C><02><00><>NK All types that implement [`Ord`] must implement [`PartialEq`], [`Eq`], and<6E><00><> [`PartialOrd`]:<3A><1C><02><<3C><01><00><>?<01>*<00><>:7 assert_trait_sub_all!(Ord: PartialEq, Eq, PartialOrd);<3B><<3C><01><1C><02><00><>MJ The following example fails to compile because [`Eq`] is not required for<6F><00><><01><><1C><02><00><><01>3<00><>?<01>*<00><>*' assert_trait_sub_all!(PartialOrd: Eq);<3B><<3C><01><1C><02><00><>B? [`assert_trait_super_all!`]: macro.assert_trait_super_all.html<6D><1C><02><00><>HE [`Copy`]: https://doc.rust-lang.org/std/marker/trait.Copy.html<6D><00><>HE [`Clone`]: https://doc.rust-lang.org/std/clone/trait.Clone.html<6D><00><>DA [`Ord`]: https://doc.rust-lang.org/std/cmp/trait.Ord.html<6D><00><>KH [`PartialOrd`]: https://doc.rust-lang.org/std/cmp/trait.PartialOrd.html<6D><00><> C@ [`Eq`]: https://doc.rust-lang.org/std/cmp/trait.Eq.html<6D><00><> JG [`PartialEq`]: https://doc.rust-lang.org/std/cmp/trait.PartialEq.html<6D><02> d<>
|<7C>
<13> <0C>
 <0C> <0C>
 <0C>  , <0C>
8<02><1C>
& <0C>
8<02> $<24>
& <0C>
, <0C>
 <0C>
 <0C>
, <0C>
8,<2C>
& <0C>
8<02> $<24>
$ <0C>
 <0C>
, <0C>  <0C>  <0C> $ <0C> - <0C> *<14>  <0C>  <0C>8,<2C> 8 <0C> & <0C>  <0C>  <0C>  <0C>  <0C>  <0C>, <0C>  <0C>  <0C>  <0C>  <0C> + <0C>  <0C>  <0C> 8<02>,<2C>  <0C>  <0C> 8non_camel_case_types<65><00><> 8,<2C> 8__Impl_Implication<6F><00><> & <0C> , <0C> 8,<2C>  <0C>  <0C> 8$<24>  <0C> 8<02> <0C> & <0C> , <0C> 8<02><1C>  <0C> 8<01><><00><> 8 <1C> 8<02> <0C>  <0C>  <0C>  <0C> % <0C>% <0C><00><>#<00><>B? Asserts that the trait is a parent of all of the other traits.<2E><1C><02>d<>Ӄ<00><> - [`assert_trait_sub_all!`]<5D><1C><02>t<><01><1C><02><00><>MJ With this, traits `A` and `B` can both be tested to require [`Copy`] on a<><00><> single line:<3A><1C><02><<3C><01><00><>41 # use static_assertions::assert_trait_super_all;<3B><00><> trait A: Copy {}<7D><00><> trait B: Copy {}<7D><1C><02><00><>(% assert_trait_super_all!(Copy: A, B);<3B><<3C><01><1C><02><00><>;8 Otherwise, each sub-trait would require its own call to<74><00><> [`assert_trait_sub_all!`]:<3A><1C><02><<3C><01><00><>?<01>*<00><> # trait A: Copy {}<7D><00><> # trait B: Copy {}<7D><00><># assert_trait_sub_all!(A: Copy);<3B><00><># assert_trait_sub_all!(B: Copy);<3B><<3C><01><1C><02><00><>MJ The following example fails to compile because trait `C` does not require<72>l<>
[`Copy`]:<3A><1C><02><00><><01>3<00><>4<01><><00><><01><><00><><01><>t<> trait C {}<7D><1C><02><00><>+( assert_trait_super_all!(Copy: A, B, C);<3B><<3C><01><1C><02><00><>>; [`assert_trait_sub_all!`]: macro.assert_trait_sub_all.html<6D><1C><02><00><>B? [`Copy`]: https://doc.rust-lang.org/std/marker/trait.Copy.html<6D><02> d<> <0C> <0C>8<02> <00><><00><>#<13> <0C> <0C> <0C> <0C> , <0C>8,<2C>& <0C>8<02> $<24>& <0C>, <0C> <0C> <0C>, <0C>8<02><1C>& <0C>8<02> $<24>$ <0C> <0C>, <0C> <0C> <0C>$ <0C>- <0C>*<14> <0C> <0C>, <0C> <0C> <0C>8<01><00><> <0C> <0C> <0C>, <0C>8<02><1C>& <0C>, <0C>8,<2C>% <0C> <0C>% <0C>|<7C>\<5C><00><>
<00>?< Asserts that _all_ types in a list are equal to each other.<2E>@<02>tD<01>S<02><00>WPM Often times, type aliases are used to express usage semantics via naming. In<49><00><>PM some cases, the underlying type may differ based on platform. However, other<65><00><>;8 types like [`c_float`] will always alias the same type.<2E><1C><02><<3C><01><00><>?<01>*<00><> use std::os::raw::c_float;<3B><1C><02><00><>&# assert_type_eq_all!(c_float, f32);<3B><<3C><01><1C><02><00><>MJ This macro can also be used to compare types that involve lifetimes! Just<73><00><> use `'static` in that case:<3A><1C><02><<3C><01><00><>2<01>[<00><><01>[<00><> type Buf<'a> = &'a [u8];<3B><1C><02><00><>52 assert_type_eq_all!(Buf<'static>, &'static [u8]);<3B><<3C><01>h<<3C><01><1C><02><00><>LI The following example fails to compile because `String` and `str` do not<6F><00><> refer to the same type:<3A><1C><02><00><><01>3<00><>?<01>*<00><>%" assert_type_eq_all!(String, str);<3B><<3C><01><1C><02><00><>GD This should also work the other way around, regardless of [`Deref`]<5D><00><> implementations.<2E><1C><02><00><><01>3<00><>?<01>*<00><> %" assert_type_eq_all!(str, String);<3B><<3C> <01><1C> <02><00><> GD [`c_float`]: https://doc.rust-lang.org/std/os/raw/type.c_float.html<6D><00><>
A> [`Deref`]: https://doc.rust-lang.org/std/ops/trait.Deref.html<6D><02> d<>
|<7C>
<13> <0C>  <0C> <0C>  <0C>  , <0C> 8<01>D <0C> & <0C> 8<02><14> $ <0C> , <0C>  <0C>  <0C> , <0C> 8<01>D<14> & <0C> 8<02><14> $ <0C>  <0C> , <0C>  <0C>  <0C> $ <0C>  <0C> *<14>  <0C>  <0C> 8,<2C> 8 <0C> & <0C> 8 <14>  <0C>  <0C>  <0C> <14>  <0C>  <0C>, <0C>  <0C>  <0C> <0C>  <0C>48,<2C> 8TypeEq<45>4<>  <0C>  <0C> 8!$<24> 8<02>$<24> & <0C> - <0C> 8<02>,<2C> % <0C> 8$<24>  <0C> 8<02> <0C> & <0C> - <0C> 8<02>,<2C>  <0C> 8<01><>4<> 8 <1C> 8<02> <0C>  <0C>  <0C> 8!$<24> 8<02>$<24>  <0C> 8$<24> % <0C> 8 <14> 8<01><00><>  <0C> 8<02> <0C> $ <0C> 8U<> <0C>  <0C>  <0C>  <0C> 8$,<2C> 8<02> <0C> & <0C> - <0C> 8<02>,<2C>  <0C> 8<01><>4<>  <0C> 8<02>$<24>  <0C> 8<01><> <0C>  <0C> $ <0C> 8<01><> <0C> & <0C>- <0C>8<02>,<2C>$ <0C> <0C> <0C>8<01><00><>'<14> <0C>, <0C>8<01>D <0C>$ <0C>, <0C>8<01>D<14> <0C> <0C> <0C>% <0C> <0C>% <0C>% <0C><00><><00><>=: Asserts that _all_ types are **not** equal to each other.<2E><1C><02>t<><01><1C><02><00><>MJ Rust has all sorts of slices, but they represent different types of data:<3A><1C><02><<3C><01><00><>?<01>*<00><>*' assert_type_ne_all!([u8], [u16], str);<3B><<3C><01><1C><02><00><>NK The following example fails to compile because [`c_uchar`] is a type alias<61>|<7C> for [`u8`]:<3A><1C><02><00><><01>3<00><>?<01>*<00><> use std::os::raw::c_uchar;<3B><1C><02><00><>*' assert_type_ne_all!(c_uchar, u8, u32);<3B><<3C><01><1C><02><00><>GD [`c_uchar`]: https://doc.rust-lang.org/std/os/raw/type.c_uchar.html<6D><00><>;8 [`u8`]: https://doc.rust-lang.org/std/primitive.u8.html<6D><02> d<>|<7C><13> <0C> <0C> <0C> <0C> , <0C>8<01>D <0C>& <0C>8<02><14>$ <0C>, <0C> <0C> <0C>, <0C>8y<> <0C>& <0C>8<02><14>$ <0C> <0C>, <0C> <0C> <0C>$ <0C>- <0C>*<14> <0C> <0C> 8,<2C>8 <0C>& <0C>8 <14> <0C> <0C> <0C><14> <0C> <0C> 8,<2C>8MutuallyExclusive<76><00><> <0C> <0C>8$<24>8̥<00><>8 <1C>, <0C>8<01>D <0C> <0C> <0C>, <0C> <0C> <0C>8$<24>8̥<00><>8 <1C>, <0C>8<01><> <0C> <0C> <0C> <0C>% <0C>% <0C><00><>d<><00><> <00>9 6 Asserts that constant expressions evaluate to `true`.<2E>: <02><00>>K H Constant expressions can be ensured to have certain properties via this<69><00><>P M macro If the expression evaluates to `false`, the file will fail to compile.<2E><00><>B ? This is synonymous to [`static_assert` in C++][static_assert].<2E><1C> <02><00><> <01>K<1C> <02><00><>I F There also exists [`const_assert_eq`](macro.const_assert_eq.html) for<6F><00><>J G validating whether a sequence of expressions are equal to one another.<2E><1C> <02>t<> <01><1C> <02><00><>N K A common use case is to guarantee properties about a constant value that's<><00><># generated via meta-programming.<2E><1C> <02><<3C> <01><00><>? <01>*<00><>  const VALUE: i32 = // ...<2E>D<>  # 3;<3B><1C> <02><00><>  const_assert!(VALUE >= 2);<3B><<3C> <01><1C> <02><00><>( % Inputs are type-checked as booleans:<3A><1C> <02><00><> <01>3<00><>? <01>*<00><>  const_assert!(!0);<3B><<3C> <01><1C> <02><00><>B ? Despite this being a macro, we see this produces a type error:<3A><1C> <02>T<>  ```txt<78><00><>  | const_assert!(!0);<3B><00><>? < | ^^ expected bool, found integral variable<6C><<3C>  |<7C><00><>"  = note: expected type `bool`<60><00><>' $ found type `{integer}`<60><<3C> <01><1C> <02><00><> L I The following fails to compile because multiplying by 5 does not have an<61><00><>  identity property:<3A><1C>
<02><00><>
<01>3<00><>
? <01>*<00><>
 const_assert!(5 * 5 == 5);<3B><<3C> <01><1C> <02><00><> L I [static_assert]: http://en.cppreference.com/w/cpp/language/static_assert<72><02> d<> |<7C> <13> <0C> <0C>  <0C> <0C> , <0C> 8<01>D <0C> & <0C> 8<02>$<24> , <0C>  <0C> <0C> $ <0C> - <0C> *<14>  <0C> <0C>  + <0C>  <0C> <0C> 8<02>,<2C>  <0C> <0C> 8<01>_l<> $ <0C> 8eq_op<6F>,<2C> 8,<2C> 8 <0C> & <0C>  <0C> <0C>  <0C> <0C> % <0C> 7<02> <0C> <0C> <0C>  <0C> <0C>  8,<2C> 8ASSERT<52>4<> & <0C> 8<02>$<24> <0C> , <0C> 8<01>D <0C> % <0C> 8<01><>4<> 8<14> 8<02>,<2C>  <0C>  <0C> <0C> % <0C> % <0C> <00><> <00><> . + Asserts that constants are equal in value.<2E><1C> <02>t<> <01><1C> <02><00><> : 7 This works as a shorthand for `const_assert!(a == b)`:<3A><1C> <02><<3C> <01><00><>? <01>*<00><>  const TWO: usize = 2;<3B><1C> <02><00><>+ ( const_assert_eq!(TWO * TWO, TWO + TWO);<3B><<3C> <01><1C> <02><00><>M J Just because 2 × 2 = 2 + 2 doesn't mean it holds true for other numbers:<3A><1C> <02><00><> <01>3<00><>? <01>*<00><># const_assert_eq!(4 + 4, 4 * 4);<3B><<3C> <01><02> d<>  <0C> <0C> 8<02> <00><> <00><>#  <0C> <0C>  <0C> <0C>  , <0C> 8<01>D <0C> & <0C> 8<02>$<24> $ <0C> , <0C> 8<01><> <0C> & <0C> 8<02>$<24> , <0C>  <0C> <0C> $ <0C> - <0C> *<14>  <0C> <0C> 8<01>d<>  <0C>  <0C> <0C> , <0C> 8<01>D <0C> <14> , <0C> 8<01><> <0C> % <0C> % <0C> <00><> <00><>6 3 Asserts that constants are **not** equal in value.<2E><1C> <02>t<> <01><1C> <02><00><>: 7 This works as a shorthand for `const_assert!(a != b)`:<3A><1C> <02><<3C> <01><00><>? <01>*<00><>  const NUM: usize = 32;<3B><1C> <02><00><>$ ! const_assert_ne!(NUM * NUM, 64);<3B><<3C> <01><1C> <02><00><>Q N The following example fails to compile because 2 is magic and 2 × 2 = 2 + 2:<3A><1C> <02><00><> <01>3<00><>? <01>*<00><># const_assert_ne!(2 + 2, 2 * 2);<3B><<3C> <01><02> d<>  <0C> <0C> 8<02> <00><> <00><>#  <0C> <0C>  <0C> <0C>  , <0C> 8<01>D <0C> & <0C> 8<02>$<24> $ <0C> , <0C> 8<01><> <0C> & <0C> 8<02>$<24> , <0C>  <0C> <0C> $ <0C> - <0C> *<14>  <0C> <0C> 8<01>d<>  <0C>  <0C> <0C> , <0C> 8<01>D <0C> <14> , <0C> 8<01><> <0C> % <0C> % <0C> -<02>Fhttps://github.com/nvzqz/static-assertions-rs/blob/master/CHANGELOG.md<6D>6https://blog.rust-lang.org/2019/08/15/Rust-1.37.0.html<6D> on crates.io<69>*https://crates.io/crates/static_assertions<6E>
Cargo.toml<6D>7https://doc.rust-lang.org/cargo/reference/manifest.html<6D>Rust 2018 edition<6F>Bhttps://blog.rust-lang.org/2018/12/06/Rust-1.31-and-rust-2018.html<6D>each individual macro<72>Banner<65>-https://github.com/nvzqz/static-assertions-rs<72> compile-time<6D> CHANGELOG.md<6D><01><><01><>*https://en.wikipedia.org/wiki/Compile_time<6D><01><><01><><02><01><><01><><01><><01><><01><><01><><01><><01><><01><><01><><01><><02><01><><01><><01><><01><><01><><01><><01><><01><><01><><01><><01><><01><><01><>8https://en.wikipedia.org/wiki/Foreign_function_interface<63>FFI<46><01><><01><><01><><01><>$t<01>2https://doc.rust-lang.org/std/primitive.usize.html<6D><01><02>0https://doc.rust-lang.org/std/primitive.u64.html<6D>0https://doc.rust-lang.org/std/primitive.u32.html<6D>macro.assert_eq_size_val.html<6D><02>macro.assert_eq_size_ptr.html<6D>4https://doc.rust-lang.org/std/clone/trait.Clone.html<6D><02><01><01><02><01><><01><><01><>t<01><01><><02><01><><01><><02><01>t<01><02><01><><01><><01><><01><><01><><02><01><><02><01><02>3https://doc.rust-lang.org/std/ops/struct.Range.html<6D><01><><02><02><01><>0 blanket impls<6C>macro.assert_impl_any.html<6D>assert_impl_all!<21>macro.assert_impl_all.html<6D>2https://doc.rust-lang.org/book/ch10-02-traits.html<6D><02>3https://doc.rust-lang.org/std/cell/struct.Cell.html<6D>assert_not_impl_all!<21>macro.assert_not_impl_all.html<6D>assert_not_impl_any!<21><02>macro.assert_not_impl_any.html<6D>4https://doc.rust-lang.org/std/marker/trait.Send.html<6D>p4https://doc.rust-lang.org/std/marker/trait.Sync.html<6D>assert_impl_any!<21><01><><01><><01><><01><><02><01><><01><><01><><01><><02><01><><01><>p<01><><01><><01><><01><><01><><02><01><><01><><01><><01><><01><><02><01><01><><01><><01><><01><>p<01><><01><><01><> object<63> object-safe<66>9https://doc.rust-lang.org/book/ch17-02-trait-objects.html<6D><01><><01><> object-safety<74><01><><01><><01><><01><><01><><01><>06https://doc.rust-lang.org/std/cmp/trait.PartialEq.html<6D>~<01>t<01><02><01>/https://doc.rust-lang.org/std/cmp/trait.Eq.html<6D><02>7https://doc.rust-lang.org/std/cmp/trait.PartialOrd.html<6D>assert_trait_sub_all!<21>macro.assert_trait_sub_all.html<6D>assert_trait_super_all!<21>!macro.assert_trait_super_all.html<6D><01><><02><02>4https://doc.rust-lang.org/std/marker/trait.Copy.html<6D>0https://doc.rust-lang.org/std/cmp/trait.Ord.html<6D><01><><02><01>~<01>t<01><02><01><><01><><01><><01><><01><><01><><02><01><01><><01><><01><><02><01><02><01>~t<02><01><01><><01><><01><><01><><01><><01><><01><><01><><02><01><01><><02><01><01><>c_float<61>6https://doc.rust-lang.org/std/os/raw/type.c_float.html<6D><02><02>2https://doc.rust-lang.org/std/ops/trait.Deref.html<6D>c_uchar<61>6https://doc.rust-lang.org/std/os/raw/type.c_uchar.html<6D><02><01><><01><><01><>/https://doc.rust-lang.org/std/primitive.u8.html<6D><02><01><><01><><01><><02><01><><01><><02><01><><01><><01><><01><> static_assert in C++<2B>macro.const_assert_eq.html<6D>7http://en.cppreference.com/w/cpp/language/static_assert<72><01><01><><01><><01><><01><01><><01><><01><><01><01>D<EFBFBD><44>:ÈS<16>p<EFBFBD><70><EFBFBD><0F>c<EFBFBD><63>^9,nLL7<4C> <09><>*<2A>5v<35><Ջc<D58B><63><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>F<EFBFBD>L'<27>x<EFBFBD><78><EFBFBD>W<>7<01><>2<EFBFBD><04><1A>8<EFBFBD><38>R<EFBFBD><52><EFBFBD><EFBFBD><EFBFBD>`VE<56><1B><><EFBFBD><EFBFBD>a<EFBFBD><61><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>v~<7E><>r \<5C><><EFBFBD><EFBFBD>ѓ<18><>†<D3AE><C286>]VJg
c<EFBFBD><EFBFBD><EFBFBD><EFBFBD>m<>j<EFBFBD><6A><EFBFBD>Ћ<EFBFBD>LH <0A><><18>>Xx0<78>L<EFBFBD><4C><EFBFBD>Z<EFBFBD><5A><EFBFBD>:+h<>B<EFBFBD>t<EFBFBD><17><><EFBFBD>Iy{<7B>N<EFBFBD>Ƥ<EFBFBD><C6A4>I<EFBFBD>VK<56><4B><EFBFBD><EFBFBD>M>+<2B><>?jK<>F<1F>*Q<><51>J><3E><1F><><EFBFBD>4<EFBFBD>+6
<EFBFBD><1B>c<EFBFBD>y*ا<><11>-99<39>=<3D>+<2B>Y+<2B><><EFBFBD>ҹY#OJV&<14><1D>#l$x!$;"+<2B>2<>6
47iAu8A<38>J<>"P<>1[r(e<>m<>Fm<46>w<>'wu-<><00><>.<2E><><18><><00><>3<EFBFBD><33><14><><14> R<00>t$7qA<00>m<00>w<00><00><00><00>)))))))))))))))))))P{<1A><1D>!r$X)<29>.<2E>57<><oAqG<71>NeT<65>aj<>m<EFBFBD>v<EFBFBD>w?}y<><79><EFBFBD>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><07>ʝנ9=?FR<14><1D>h$t$6+<2B>2<EFBFBD>67eAqA<71>J<EFBFBD>P<EFBFBD>[me<6D>m<EFBFBD>m<EFBFBD>w<EFBFBD>wp<70><7F><EFBFBD><EFBFBD>ӎ<EFBFBD><D38E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;CLx<1A><1D>!n$U)<29>.<2E>57<><kAnG<6E>NbT<62>aj<>m<EFBFBD>v<EFBFBD>w<}v<><76><EFBFBD>@<40><><EFBFBD><EFBFBD><EFBFBD><04>ǝԠJ<00>l$<00>6iA<00>m<00>w<00><><00><><EFBFBD><00><00><00><00><00><00><00><00> +DX_q<01><01><01><01><01><01>2Oaz<02><02><02><02>|<00>!Y)<29>.<2E>5<00><rG<72>NfT<66>aj<00>v@}z<>D<><44><EFBFBD><08>˝ؠΡ<00><><00><>Ц$<24>ɩe<><13>v<><13><13><13><13><02> <00>D<EFBFBD><44>:Ì<>m<>i<><1F>в̲Բ<CCB2><D4B2><EFBFBD><EFBFBD><0F><>ODHT @<02><><00>a<EFBFBD><61><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <00><><EFBFBD>m<>j<00>c<EFBFBD><63><EFBFBD><EFBFBD><EFBFBD><EFBFBD><00><>?jK<>y*ا<><11>-<00>2<EFBFBD><04><1A>8Ƥ<><C6A4>I<EFBFBD>VK<00><><EFBFBD>Ћ<EFBFBD>LXx0<78>L<EFBFBD><4C><EFBFBD><00><><EFBFBD><EFBFBD>M>+F<1F>*Q<><51>JB<>t<EFBFBD><17><><EFBFBD><00>v~<7E><>r H <0A><><18>>`VE<56><1B><><EFBFBD>
+6
<EFBFBD><1B>c<EFBFBD>Y+<2B><><EFBFBD>ҹY<00>F<EFBFBD>L'<27>x<EFBFBD><00>]VJg
c<EFBFBD><00><>†<D3AE><00>S<16>p<EFBFBD><70><EFBFBD>><3E><1F><><EFBFBD>4<EFBFBD><00><>R<EFBFBD><52><EFBFBD><EFBFBD><EFBFBD> nLL7<4C> <09><>*<2A>5v<35><<3C>99<39>=<3D>+<2B><00>D<EFBFBD><44>:<10>Iy{<7B>N<EFBFBD>\<5C><><EFBFBD><EFBFBD>ѓ <00><>W<>7<01><0F>c<EFBFBD><63>^9,Z<><5A><EFBFBD>:+h<><00>J5w<1C><>%<25>
M<15><><EFBFBD>%<25><><EFBFBD><EFBFBD><EFBFBD>|<1F>EU,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Dv<44><76><EFBFBD><EFBFBD><EFBFBD>]<5D>z]<5D><>S<EFBFBD>Nj<03>a^ NZ<>J5w<1C><>%<25>
M<15><>eC:\Users\dxzq\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\static_assertions-1.1.0\src\lib.rs<72> <20><><EFBFBD> ]f<><66>|<)Vͅ4<CD85><00>a<01>>^ Dn \ ONJKQ! P0  9$N**8QaL OOL-w +o HY8?LCh  f<>p<EFBFBD>7<EFBFBD><37>(<28>$,v<><76>:<3A>lC:\Users\dxzq\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\static_assertions-1.1.0\src\assert_cfg.rs<72> <20>K<EFBFBD><07>8<EFBFBD>6}<1E><11>6<EFBFBD>8<00> 1/Q@?3KQ@!R17FFOO-@),9*N<02> <03> <03><>'<27>4}HV5<56><35>mp<6D>&<26>qC:\Users\dxzq\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\static_assertions-1.1.0\src\assert_eq_align.rs<72> %<25>R<EFBFBD>|<7C>g<EFBFBD>+<2B><><11><>+<2B><00>
-/OP:@1M@%L'@%'D$O.I |.<2E><>H:6<><1D><><EFBFBD>Y2(<28>pC:\Users\dxzq\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\static_assertions-1.1.0\src\assert_eq_size.rs<72> <20><>R<EFBFBD><52>C<EFBFBD><43><EFBFBD><EFBFBD>=7u<37>?<3F><00>{*OP PQQM@/Q
@B>>$B 6Q:@1#L"3 !'"(M+*G +@37$K3$D$"(-<00>R>%<25><>{<7B>EB<45>Qx<51>oC:\Users\dxzq\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\static_assertions-1.1.0\src\assert_fields.rs<72> f<><66>g<EFBFBD>D<EFBFBD> <0A><12><>frw<72><00>H0NI3+0@ *c@(C-86#4 "8& ;}<7D><EFBFBD><E4AB83> C<><43><EFBFBD><EFBFBD>'<27>mC:\Users\dxzq\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\static_assertions-1.1.0\src\assert_impl.rs<72> <20><>9<><39><EFBFBD><EFBFBD>2<EFBFBD><32><EFBFBD>U<EFBFBD>GD<00>d<EFBFBD>E Q;/>;/C;/99==%M.L"OF@$LPMP.B @DPA@'*Q@@'=CCx,Q<( @DM@0P@5QN @-=CC%4+P2*NQM*O-(DE9KQD5%7 MM=/X18QLO!K LJNKGDP@7M @*Q@12@+CC=Bx#%J'L"9B) GPM;; LJNNQL<N)@60@1M<@5CC=x#%J'L"9QQ0$ GPM?; W]<5D>\<5C>}<7D>er<65>:`<60>qC:\Users\dxzq\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\static_assertions-1.1.0\src\assert_obj_safe.rs<72> <20><><EFBFBD>Isǘ<>r<EFBFBD><72>~ox-<00>L45~JMOOQN@4:@
&)O@#DP@%6@1%t* oG<6F>vDB͉@<40>6<EFBFBD><36>6nC:\Users\dxzq\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\static_assertions-1.1.0\src\assert_trait.rs<72><06><><EFBFBD>fT <0C>D<02><00>iB "@@(O@;N@+CIIELDK$-*/4K%: C N5)<@$$N5,?C$&-1<05><><EFBFBD><EFBFBD>oy<6F><79><EFBFBD><EFBFBD>U<EFBFBD>0d<30>mC:\Users\dxzq\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\static_assertions-1.1.0\src\assert_type.rs<72> {<7B><>C<EFBFBD>ؘ <14><04>6<EFBFBD><36><EFBFBD><00>e@QQ<@'N 36M@&H@&HB"$!#+"*.->N@+O@+H<"#'-1 <11>Q%(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>_nC:\Users\dxzq\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\static_assertions-1.1.0\src\const_assert.rs<72> <20>K<EFBFBD><><ECA7A8>İ|<7C><>x<EFBFBD><00>m:LQCJKO$@ )@C @#(M@M'O/;@,N@$$"!7;@%R@$$"!<02><02><02>;<1A>I{ى1<D989>^<10>~C
<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>a<EFBFBD><61><EFBFBD>}<7D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>x86_64-pc-windows-gnu<6E><75>[$<24>q<71>K<EFBFBD>dcd<63><64>a)static_assertions<6E>-70a0e620d808c9e4<65><34>D<EFBFBD><44>:<10><02><>R<00><>  <00> `W  @  @@: @ @:W
<EFBFBD>rust-end-file