From c4e2d5c1dc87fa93a3763d0336c5373f57ad8815 Mon Sep 17 00:00:00 2001 From: Trevor Spiteri Date: Wed, 21 Apr 2021 18:14:45 +0200 Subject: [PATCH] Mark the Bit, Unsigned and Integer traits as 'static (#171) * Mark the Bit, Unsigned and Integer traits as 'static * Add Copy + Default as supertraits to the Integer trait --- src/marker_traits.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/marker_traits.rs b/src/marker_traits.rs index c83c49a4a..5994dcc69 100644 --- a/src/marker_traits.rs +++ b/src/marker_traits.rs @@ -34,7 +34,7 @@ pub trait Ord { /// The **marker trait** for compile time bits. /// /// This trait should not be implemented for anything outside this crate. -pub trait Bit: Copy + Default { +pub trait Bit: Copy + Default + 'static { #[allow(missing_docs)] const U8: u8; #[allow(missing_docs)] @@ -60,7 +60,7 @@ pub trait Bit: Copy + Default { /// assert_eq!(U3::to_u32(), 3); /// assert_eq!(U3::I32, 3); /// ``` -pub trait Unsigned: Copy + Default { +pub trait Unsigned: Copy + Default + 'static { #[allow(missing_docs)] const U8: u8; #[allow(missing_docs)] @@ -129,7 +129,7 @@ pub trait Unsigned: Copy + Default { /// assert_eq!(P3::to_i32(), 3); /// assert_eq!(P3::I32, 3); /// ``` -pub trait Integer { +pub trait Integer: Copy + Default + 'static { #[allow(missing_docs)] const I8: i8; #[allow(missing_docs)]