]> git.proxmox.com Git - cargo.git/blobdiff - vendor/typenum/src/lib.rs
New upstream version 0.52.0
[cargo.git] / vendor / typenum / src / lib.rs
index 022fa655c6b2789ea75451eb8c9c0014031d0f56..bf616a20ee8ab645077b4e929d357f7e6727f62d 100644 (file)
@@ -8,7 +8,7 @@
 //! example,
 //!
 //! ```rust
-//! use typenum::{N4, Integer};
+//! use typenum::{Integer, N4};
 //!
 //! assert_eq!(N4::to_i32(), -4);
 //! ```
 //! could be replaced with
 //!
 //! ```rust
-//! use typenum::{Sum, Integer, P3, P4};
+//! use typenum::{Integer, Sum, P3, P4};
 //!
 //! type X = Sum<P3, P4>;
 //! assert_eq!(<X as Integer>::to_i32(), 7);
 //! ```
 //!
 //! Documented in each module is the full list of type operators implemented.
-//!
 
 #![no_std]
 #![forbid(unsafe_code)]
 #![cfg_attr(
     feature = "cargo-clippy",
     allow(
-        clippy::type_complexity,
         clippy::len_without_is_empty,
+        clippy::many_single_char_names,
         clippy::new_without_default,
-        clippy::many_single_char_names
+        clippy::suspicious_arithmetic_impl,
+        clippy::type_complexity,
+        clippy::wrong_self_convention,
     )
 )]
 #![cfg_attr(feature = "cargo-clippy", deny(clippy::missing_inline_in_public_items))]
@@ -87,15 +88,16 @@ pub mod uint;
 
 pub mod array;
 
-pub use consts::*;
-pub use generated::consts;
-pub use marker_traits::*;
-pub use operator_aliases::*;
-pub use type_operators::*;
-
-pub use array::{ATerm, TArr};
-pub use int::{NInt, PInt};
-pub use uint::{UInt, UTerm};
+pub use crate::{
+    array::{ATerm, TArr},
+    consts::*,
+    generated::consts,
+    int::{NInt, PInt},
+    marker_traits::*,
+    operator_aliases::*,
+    type_operators::*,
+    uint::{UInt, UTerm},
+};
 
 /// A potential output from `Cmp`, this is the type equivalent to the enum variant
 /// `core::cmp::Ordering::Greater`.
@@ -140,7 +142,8 @@ impl Ord for Equal {
 #[macro_export]
 macro_rules! assert_type_eq {
     ($a:ty, $b:ty) => {
-        let _: <$a as $crate::Same<$b>>::Output;
+        const _: core::marker::PhantomData<<$a as $crate::Same<$b>>::Output> =
+            core::marker::PhantomData;
     };
 }
 
@@ -148,6 +151,7 @@ macro_rules! assert_type_eq {
 #[macro_export]
 macro_rules! assert_type {
     ($a:ty) => {
-        let _: <$a as $crate::Same<True>>::Output;
+        const _: core::marker::PhantomData<<$a as $crate::Same<True>>::Output> =
+            core::marker::PhantomData;
     };
 }