From 367bd91878ca863bd07791473770a0cce6964c9f Mon Sep 17 00:00:00 2001 From: Arvid Gerstmann Date: Tue, 12 Nov 2024 07:11:43 +0000 Subject: [PATCH] chore: validate that `'static` types are registerable --- ferrunix/tests/it/manual.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ferrunix/tests/it/manual.rs b/ferrunix/tests/it/manual.rs index 29f0e46..c83897e 100644 --- a/ferrunix/tests/it/manual.rs +++ b/ferrunix/tests/it/manual.rs @@ -155,3 +155,11 @@ fn register_not_clone() { let _not_clone = registry.get_transient::().unwrap(); } + +struct TupleWithStatic(&'static str); + +#[test] +fn register_static_lifetime() { + let registry = Registry::empty(); + registry.transient(|| TupleWithStatic("TEST")); +}