Files
guba-indicator/rust/target/debug/deps/libstatic_assertions-2b821694ebd9e518.rmeta

176 lines
49 KiB
Plaintext
Raw Normal View History

rust
<EFBFBD><EFBFBD>#rustc 1.93.1 (01f6ddf75 2026-02-11)<29><02><05><11><><EFBFBD>GȬx<C8AC>92X<32>l-5bed970bceb2abc5<63><02>L<><4C><EFBFBD><EFBFBD><EFBFBD>l<EFBFBD>E,<07>R<EFBFBD><52>-3d16dd14375d91ab<61><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><01><>
<01><02><> <01>l<>
 <01>|<7C> <01>|<7C><01>|<7C>'<01><03><>H<01><03><>\<01>|<7C><01><03><>
<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><13><01><13><01> <01>
<01>! <01>0 <01>?<01>N<01>]<01>l<01>{<01><13><01><13><01><13><01><13><01><13><01><13><01><13><01><13><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>&|<7C> <13> <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>5<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>2<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>&|<7C><13> <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>C <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>2<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>&|<7C>  <0C>  <0C>
 <0C>  <0C>  , <0C> 8<01>C <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>E<1C>
'<14>
8<02>L<>
'<14>
 <0C>
, <0C>
8<01>C <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>2<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>&|<7C> <0C> <0C> <0C> <0C> , <0C>8<01>C <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>E<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>C <0C>% <0C>, <0C> <0C> <0C>8<02> <1C>'<14>8write<74>,<2C> <0C> <0C> <0C>8<1C>8<02>$<24>$ <0C>8<01>E<1C>'<14>8<02>L<> <0C> <0C>8<02> <1C>'<14>8<01>a$<24> <0C> <0C>, <0C>8<01>D<14>% <0C> <0C>8<01>E<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>Z<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>2<00><>2<01>Z<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>&<26><>#! <0C> <0C> <0C> <0C> , <0C>8<01>C <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>C <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>Z<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>2<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>&|<7C> 0 <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>x <0C>  <0C>  <0C> 8,<2C> 8<02>,<2C>  <0C>  <0C> , <0C>  <0C>  <0C>  , <0C> 8<01>x <0C> '<14> , <0C> 8<01>x <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>x <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>z<00><> 8,<2C> 8 <0C>& <0C>8 <14> <0C> <0C> <0C><14> <0C> <0C>, <0C> <0C> <0C>8<1C>, <0C>8<01>x <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>2<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><>.<01><><<3C><01><1C><02><00><>B? If `Snap` or `Pop` is _also_ implemented, the assertion fails:<3A><1C><02><00><><01>2<00><>:<01><><00><><01><><00><><01><><00><>ш<00><><01><><00><> # impl Crackle for Foo {}<7D><00><> impl Pop for Foo {}<7D><1C><02><00><>.<01><><<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>&|<7C> ? <0C>  <0C> <0C>  <0C>  , <0C> 8<01>C <0C> & <0C> 8<02><14> & <0C> , <0C>  <0C>  <0C> , <0C> 8<01>x <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>x <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>C <0C>8<14>8<01><><00><> <0C>8 <0C><14>'<14>8<01><>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>2<00><>?<01>*<00><>&# assert_impl_all!(*const u8: Send);<3B><<3C><01><1C><02><00><><<01><><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>&|<7C>N <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>2<00><>%?<01>*<00><>%,) assert_impl_any!(*const u8: Send, Sync);<3B><<3C>%<01><1C>%<02><00><>&<<01><><00><>&Bњ<00><>'B<01><>&|<7C>'] <0C>' <0C>: <0C>' <0C>( , <0C>'8<01>C <0C>'& <0C>'8<02><14>'& <0C>', <0C>( <0C>( <0C>(, <0C>(8<01>x <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>x <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>C <0C>7$ <0C>78 <0C>7 <0C>7 <0C>7 <0C>78<01><>\<5C>7$ <0C>78<01><>D<>7% <0C>7 <0C>78<01><><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>2<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>2<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><>&|<7C>Hl <0C>H <0C>O <0C>H <0C>H , <0C>H8<01>C <0C>H& <0C>H8<02><14>H& <0C>H, <0C>H <0C>H <0C>H, <0C>H8<01>x <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 <0C>I <0C>O88,<2C>I8AmbiguousIfImpl<70>|<7C>I <0C>I8<01><> <0C>I <0C>I <0C>J <0C>J8 <14>J8<01><>L<>J <0C>J <0C>J <0C>J <0C>J8$<24>K <0C>K8<02> <0C>K& <0C>K- <0C>K8<02>,<2C>K <0C>K8<01><>|<7C>K <0C>K <0C>K <0C>K <0C>K8 <1C>K8<02> <0C>K <0C>K <0C>K+ <0C>L <0C>L <0C>L8<02>,<2C>L <0C>L <0C>L8<02>L<>L84<>L8Invalid<69><<3C>L% <0C>L8$<24>L <0C>L8<02> <0C>L& <0C>L- <0C>L8<02>,<2C>L, <0C>L <0C>L <0C>M <0C>L, <0C>M8<01>x <0C>M <0C>M <0C>M8<01><>|<7C>M <0C>M8<01><><<3C>M <0C>M8 <1C>M8<02> <0C>M <0C>M <0C>M8<1C>O8 <0C>O <0C>O <0C>O, <0C>O8<01>C <0C>O8<14>O8<01><>|<7C>O <0C>O8 <0C>O<14>O'<14>O8<01><>L<>O% <0C>O% <0C>O% <0C>O<00><>\ <00><>OKH Asserts that the type does **not** implement _any_ of
 between threads safely:<3A><1C>
<02><00><>
<01>2<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>2<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>&|<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<01><><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>2<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>&|<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<><01><><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>2<00><>4<01><><00><>ʂ<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>&<26><>#<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>Z<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>2<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>2<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>&|<7C>
<13> <0C>  <0C> <0C>  <0C>  , <0C> 8<01>C <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>C <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>2<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>&|<7C><13> <0C> <0C> <0C> <0C> , <0C>8<01>C <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<01><><00><>8 <1C>, <0C>8<01>C <0C> <0C> <0C>, <0C> <0C> <0C>8$<24>8<01><><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>J<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>2<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>2<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>&|<7C> <13> <0C> <0C>  <0C> <0C> , <0C> 8<01>C <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>C <0C> % <0C> 8Ĵ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>2<00><>? <01>*<00><># const_assert_eq!(4 + 4, 4 * 4);<3B><<3C> <01>&<26><># <13> <0C> <0C>  <0C> <0C>  , <0C> 8<01>C <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>C <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>2<00><>? <01>*<00><># const_assert_ne!(2 + 2, 2 * 2);<3B><<3C> <01>&<26><># <13> <0C> <0C>  <0C> <0C>  , <0C> 8<01>C <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>C <0C> <14> , <0C> 8<01><> <0C> % <0C> % <0C> -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> CHANGELOG.md<6D>Fhttps://github.com/nvzqz/static-assertions-rs/blob/master/CHANGELOG.md<6D> compile-time<6D>*https://en.wikipedia.org/wiki/Compile_time<6D> on crates.io<69><02>6https://blog.rust-lang.org/2019/08/15/Rust-1.37.0.html<6D>*https://crates.io/crates/static_assertions<6E>
Cargo.toml<6D>7https://doc.rust-lang.org/cargo/reference/manifest.html<6D><01><><01><><01><><01><><01><><01><><01><><01><><01><><02><01><><01><><01><><01><><01><><01><><01><><01><><01><><01><><01><><01><><01><><02><01><><01><><01><><01><><01><><01><>FFI<46>8https://en.wikipedia.org/wiki/Foreign_function_interface<63><01><><01><><01><><01><>$macro.assert_eq_size_val.html<6D>macro.assert_eq_size_ptr.html<6D><02>u<01>4https://doc.rust-lang.org/std/clone/trait.Clone.html<6D><02><01><01>2https://doc.rust-lang.org/std/primitive.usize.html<6D>0https://doc.rust-lang.org/std/primitive.u64.html<6D><02>0https://doc.rust-lang.org/std/primitive.u32.html<6D><01><><02><01><>u<01><><01><02><01><01><><02><01><><01><><01><><02>u<01><01><><01><><01><02><01><02><01><><01><><01><><02><02>3https://doc.rust-lang.org/std/ops/struct.Range.html<6D><01><><02><01><>03https://doc.rust-lang.org/std/cell/struct.Cell.html<6D>assert_not_impl_any!<21>macro.assert_not_impl_any.html<6D>4https://doc.rust-lang.org/std/marker/trait.Send.html<6D>4https://doc.rust-lang.org/std/marker/trait.Sync.html<6D>assert_impl_any!<21>macro.assert_impl_any.html<6D><02> blanket impls<6C>2https://doc.rust-lang.org/book/ch10-02-traits.html<6D>assert_impl_all!<21>macro.assert_impl_all.html<6D>assert_not_impl_all!<21><02>q<01><>macro.assert_not_impl_all.html<6D><01><><01><><01><><01><><02><01><><01><><01><><01><><01><><02><01><>q<01><><01><><01><><01><><01><><01><><02><01><><01><><01><><01><><01><><02><01><01><><01><><01><><01><><01><>q object-safety<74>object<63> object-safe<66>9https://doc.rust-lang.org/book/ch17-02-trait-objects.html<6D><01><><01><><01><><01><><01><><01><><01><><01><>0macro.assert_trait_sub_all.html<6D><02><01>assert_trait_super_all!<21><01>u<01><01><>!macro.assert_trait_super_all.html<6D>4https://doc.rust-lang.org/std/marker/trait.Copy.html<6D><02><01>0https://doc.rust-lang.org/std/cmp/trait.Ord.html<6D>6https://doc.rust-lang.org/std/cmp/trait.PartialEq.html<6D>/https://doc.rust-lang.org/std/cmp/trait.Eq.html<6D>7https://doc.rust-lang.org/std/cmp/trait.PartialOrd.html<6D><02><01>assert_trait_sub_all!<21><01><><02><01><02>u<01><><01><><01><><01><><02><01><01><><01><><01><><01><><01><><02><01><02><02><01><01><><01>u<01><01><><01><><01><><02><01><><01><><01><><01><><01><><01><><02><01><02>6https://doc.rust-lang.org/std/os/raw/type.c_uchar.html<6D>/https://doc.rust-lang.org/std/primitive.u8.html<6D>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><01><><01><><01><><01><><02><01><><02><01><><01><><01><><01><><01><><01><><01><><02><02> <01>static_assert in C++<2B>macro.const_assert_eq.html<6D><01>7http://en.cppreference.com/w/cpp/language/static_assert<72><01><><01><><01><><01><><01><01><><01><><01><> <20><>5d3<64>"<22><3((@<40><>Jo,Ca0<61>LLC<06>bJ<62>Dp<44><70>S<EFBFBD>\<5C><>B<EFBFBD><42><EFBFBD><EFBFBD><EFBFBD>Pr& +<2B><>X<0F>K<EFBFBD><4B><EFBFBD>t<EFBFBD><74>^<02>M<EFBFBD><4D>v<EFBFBD><76>q<EFBFBD><71><EFBFBD><EFBFBD>We<57><65><EFBFBD>\<18>A<EFBFBD><41><EFBFBD>P<EFBFBD><50>X<EFBFBD><58>r%<25><03><>ǃ<>#<23>xv<78><76>2P<32>M<EFBFBD>_. <0A>C[<5B>nO<6E><4F>0d<30>h:H<><48>l[<5B><1A><><EFBFBD><16><>lMP<4D> <0C><><EFBFBD><EFBFBD>J~%<00>P<EFBFBD><11><1A><>╙B}<7D><>\7<>g<EFBFBD>C}}b2<62><13><><EFBFBD><EFBFBD>̓|<7C>h<1E>)(<28>A <0A>&<26><><EFBFBD>Ӫ<EFBFBD>_<EFBFBD><5F><EFBFBD>@<40><>t'<27><><EFBFBD><7F>L<EFBFBD>r<EFBFBD>|5A<35>PK<50><4B><EFBFBD>MB<4D>@Ӡ<>@<40><>O+7&x<1D>#9$E!$<24>"*A2<>6<>46<34>@8A8J\"P,1[<5B>(dm!Fm*w7'w<>-~<7E><00><>.<2E><><18><><00><>3<EFBFBD><33><14><><14><> 3<00>A$<00>6Am2w<00><00><00><00>)))))))))))))))))))<29>1R~<1D>!?$)<29>.T5<54>60<<3C>@<40>FgN<67>S-apim
v0w<EFBFBD>|<7C><>ބd<DE84>ɐ<EFBFBD><C990><14><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '3t<1D>5$A$<24>*<2<>6<EFBFBD>6<EFBFBD>@A4JXP'[<5B>dmm&w2w<32><><D484>􍱒<EFBFBD><F48DB192>ǚ<EFBFBD><C79A>$-Oz<1D>!;$)<29>.Q5<51>6-<<3C>@<40>FdN<64>S*amimv,w<>|<7C><>ڄa<DA84>Ɛ<EFBFBD><C690><11><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+x9$<00>6<00>@m*w؄<00><><EFBFBD><00><00><00><00><00><00><00><00><00><00> %9@Rh~<01><01><01><01><01><01>0B[t<02><02><02>S<00>!)<29>.U51<<00>FhN<68>S.aqi v<00>|<7C><>e<>ʐ<15><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>o<>ͣ<00><><00><><00><>4<><00><>E<><13><13><13><13><02> <00><> <20><>5d3<64><33>m<>i<><><EEB19F><EFBFBD><EFBFBD><EFBFBD>DZ<EFBFBD><C7B1>ޱ<EFBFBD>ODHT @<02><><00><1A><><EFBFBD><16><><00><>ǃ<>#<23> 7<>g<EFBFBD>C}}bnO<6E><4F>0d<30><00>LLC<06>bJ<18>A<EFBFBD><41><EFBFBD>P<EFBFBD> lMP<4D> <0C><><EFBFBD>Pr& +<00>Dp<44><70>S<EFBFBD>\<00>_. <0A>C[<5B><00><>B<EFBFBD><42><EFBFBD><EFBFBD><EFBFBD><00><11><1A><><EFBFBD><EFBFBD>h:H<><48>l[<00>|<7C>h<1E>)(<00>t<EFBFBD><74>^<02>M<00>@Ӡ<>@<40><00><>We<57><65><EFBFBD>\
<00>B}<7D><>\<00>J~%<00>P<00>A <0A>&<26><><EFBFBD><00><>v<EFBFBD><76>q<EFBFBD><71> <00><> <20><>5d3<00><>Jo,Ca02<><13><><EFBFBD><EFBFBD><EFBFBD><00>X<EFBFBD><58>r%<25> <00>"<22><3((@xv<78><76>2P<32>MӪ<>_<EFBFBD><5F><EFBFBD>@<00><>t'<27><><EFBFBD><00>PK<50><4B><EFBFBD>MB<00>L<EFBFBD>r<EFBFBD>|5A<00><>X<0F>K<EFBFBD><4B><00>d<EFBFBD>n1w%<25><><EFBFBD><EFBFBD>Qy<51>.<2E>l<EFBFBD><6C>zJ<7A>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>&O.
<EFBFBD><EFBFBD>(j<>C<EFBFBD><19><18><><EFBFBD><EFBFBD>f & <20><><EFBFBD>g<EFBFBD>!<21><> {<7B>d<EFBFBD>n1w%<25><><EFBFBD><EFBFBD>Qy<51>.iC:\Users\dxzq\.cargo\registry\src\mirrors.ustc.edu.cn-38d0e5eb5da2abae\static_assertions-1.1.0\src\lib.rs<72> L<><4C><EFBFBD><EFBFBD>j<EFBFBD>f1<66>t<EFBFBD>Z4<5A>V<EFBFBD><56>3Z<33>p<EFBFBD><70>lV<16><>p ;<00><1A>a<01>>^ Dn \ ONJKQ! P0  9$N**8QaL OOL-w +o HY8?LCh  8<>9b<39> <0C>OCU5<55>ȯ<EFBFBD>pC:\Users\dxzq\.cargo\registry\src\mirrors.ustc.edu.cn-38d0e5eb5da2abae\static_assertions-1.1.0\src\assert_cfg.rs<72> Β0<CE92><30>U<EFBFBD><55>!<21><><EFBFBD><EFBFBD>#=<3D><>>˃()<29>#<23><>T<7F>Eu"<00> <0A> 1/Q@?3KQ@!R17FFOO-@),9*N<02> <03> hI<68>!<21><><1C>Mn<4D>U.<2E>uC:\Users\dxzq\.cargo\registry\src\mirrors.ustc.edu.cn-38d0e5eb5da2abae\static_assertions-1.1.0\src\assert_eq_align.rs<72> <20><>N<EFBFBD>GdF<64>3zJ<7A><4A>P<EFBFBD><50>x
B<EFBFBD><EFBFBD>a?<0F> "S1<53><00>
<EFBFBD>
-/OP:@1M@%L'@%'D$O.I R=<3D>G<EFBFBD>Ab<41><62>/<2F><1C>tC:\Users\dxzq\.cargo\registry\src\mirrors.ustc.edu.cn-38d0e5eb5da2abae\static_assertions-1.1.0\src\assert_eq_size.rs<72> <20>m/<2F>Nz<><7A>{|/<2F><>ƚ<EFBFBD><C69A> <12>AaL<61>O:<3A>QͶL<00><1A>{*OP PQQM@/Q
@B>>$B 6Q:@1#L"3 !'"(M+*G +@37$K3$D$"(-Ӈ<1C>ۈ<EFBFBD><DB88>G<EFBFBD>><3E>М<EFBFBD>sC:\Users\dxzq\.cargo\registry\src\mirrors.ustc.edu.cn-38d0e5eb5da2abae\static_assertions-1.1.0\src\assert_fields.rs<72> <20>[<5B><><15>Ur<13><><EFBFBD><0F> <0A>
r<1D>,6<><36><EFBFBD>C<EFBFBD><43><EFBFBD>܎<00><0E>H0NI3+0@ *c@(C-86#4 "8& <00>9<EFBFBD>gjjw<6A><77>^@><3E><>T<EFBFBD>qC:\Users\dxzq\.cargo\registry\src\mirrors.ustc.edu.cn-38d0e5eb5da2abae\static_assertions-1.1.0\src\assert_impl.rs<72> <20>Z/<2F>˷<EFBFBD>`<60><1B>Y<04><>O<EFBFBD><4F><EFBFBD>폧WdE<64><45><EFBFBD><EFBFBD><17><00>d<EFBFBD>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?; <00><>]<5D>>_<><5F><EFBFBD>Ca.<2E>,<2C>uC:\Users\dxzq\.cargo\registry\src\mirrors.ustc.edu.cn-38d0e5eb5da2abae\static_assertions-1.1.0\src\assert_obj_safe.rs<72> <20>XH <09><>-<2D><>f<EFBFBD><66><EFBFBD><EFBFBD><12><>"<22>e<EFBFBD>S<EFBFBD>{h<>h<EFBFBD><1E><00><12>L45~JMOOQN@4:@
&)O@#DP@%6@1%t*,l<>n<EFBFBD><6E>r&&<26><><EFBFBD>_LR9rC:\Users\dxzq\.cargo\registry\src\mirrors.ustc.edu.cn-38d0e5eb5da2abae\static_assertions-1.1.0\src\assert_trait.rs<72> <20><><EFBFBD><EFBFBD><EFBFBD>3M<33>Θ<EFBFBD><CE98>:<1F><>r\^+4<>L<EFBFBD>E|<7C><0E>0<00><18>iB "@@(O@;N@+CIIELDK$-*/4K%: C N5)<@$$N5,?C$&-1<00><><EFBFBD><EFBFBD><EFBFBD><1F><><EFBFBD><EFBFBD><EFBFBD>R<EFBFBD>&qC:\Users\dxzq\.cargo\registry\src\mirrors.ustc.edu.cn-38d0e5eb5da2abae\static_assertions-1.1.0\src\assert_type.rs<72> |<7C>B4<1E><>^O<><4F><EFBFBD>+<2B><>7<EFBFBD>l<EFBFBD>.<2E><>a<15><><EFBFBD><18><00><16>e@QQ<@'N 36M@&H@&HB"$!#+"*.->N@+O@+H<"#'-1 s<><73>^<5E><1C>B<EFBFBD>~<7E><17>IrC:\Users\dxzq\.cargo\registry\src\mirrors.ustc.edu.cn-38d0e5eb5da2abae\static_assertions-1.1.0\src\const_assert.rs<72> <20><><EFBFBD><EFBFBD><16>DU<44><55><EFBFBD>#Pqc<71><63>+<2B><><EFBFBD>mVm<03><>$<24>Q<00><17>m:LQCJKO$@ )@C @#(M@M'O/;@,N@$$"!7;@%R@$$"!<02><02>[<5B>3<EFBFBD><33><EFBFBD><EFBFBD>ך<EFBFBD><D79A><EFBFBD>
jr<>{<7B>a<EFBFBD>B<EFBFBD>p<EFBFBD>j<EFBFBD><EFBFBD><EFBFBD><7F><EFBFBD><EFBFBD><EFBFBD>x86_64-pc-windows-msvc<76><63>x<00>m61}J{E<>Xstatic_assertions<6E>-2b821694ebd9e518<31><38><EFBFBD> <20><>5d3<02><>R<00><>  <00> `W   @ @@: @ @:W
<EFBFBD>rust-end-file