1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
// TESTS.rs // by Lut99 // // Created: // 24 Oct 2024, 13:19:12 // Last edited: // 24 Oct 2024, 13:22:22 // Auto updated? // Yes // // Description: //! Implements some tests. // use super::*; /***** LIBRARY *****/ #[cfg(feature = "macros")] #[test] fn test_static_trace() { use std::error::Error; #[allow(unused)] trait Test { type Error: Error; fn failure(&self) -> Self::Error; } #[allow(unused)] fn test(test: impl Test) { // Let's try to trace the resulting error eprintln!("{}", toplevel!(("Failed to test"), test.failure())); } }