Skip to content

Commit

Permalink
Mark the Bit, Unsigned and Integer traits as 'static (#171)
Browse files Browse the repository at this point in the history
* Mark the Bit, Unsigned and Integer traits as 'static

* Add Copy + Default as supertraits to the Integer trait
  • Loading branch information
tspiteri committed Apr 21, 2021
1 parent c2e402b commit c4e2d5c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/marker_traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand All @@ -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)]
Expand Down Expand Up @@ -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)]
Expand Down

0 comments on commit c4e2d5c

Please sign in to comment.