34 lines
783 B
Rust
34 lines
783 B
Rust
#![deny(unsafe_code)]
|
|
#![warn(clippy::pedantic, clippy::cargo)]
|
|
#![no_std]
|
|
|
|
#[cfg(feature = "macros")]
|
|
pub use macros::test;
|
|
|
|
use core::fmt::{Debug, Display};
|
|
|
|
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
|
pub struct TestToken {
|
|
_priv: (),
|
|
}
|
|
|
|
impl Debug for TestToken {
|
|
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
|
f.debug_struct("TestToken").finish()
|
|
}
|
|
}
|
|
|
|
impl Display for TestToken {
|
|
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
|
write!(f, "{}", core::any::type_name::<Self>())
|
|
}
|
|
}
|
|
|
|
impl TestToken {
|
|
#[must_use]
|
|
#[doc(hidden)]
|
|
#[allow(non_snake_case)]
|
|
pub const fn __private_teto_macros_only__create_teto_test_token() -> Self {
|
|
Self { _priv: () }
|
|
}
|
|
}
|