diff options
Diffstat (limited to 'tests-integration')
-rw-r--r-- | tests-integration/tests/macros_main.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests-integration/tests/macros_main.rs b/tests-integration/tests/macros_main.rs index 182e2779..42f5be3b 100644 --- a/tests-integration/tests/macros_main.rs +++ b/tests-integration/tests/macros_main.rs @@ -5,6 +5,11 @@ async fn basic_main() -> usize { 1 } +#[tokio::main] +async fn generic_fun<T: Default>() -> T { + T::default() +} + #[cfg(feature = "rt-core")] mod spawn { #[tokio::main] @@ -22,4 +27,5 @@ mod spawn { #[test] fn shell() { assert_eq!(1, basic_main()); + assert_eq!(bool::default(), generic_fun::<bool>()) } |