Skip to content

Commit

Permalink
chore: validate that 'static types are registerable
Browse files Browse the repository at this point in the history
  • Loading branch information
Leandros committed Nov 12, 2024
1 parent ec8a430 commit 367bd91
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ferrunix/tests/it/manual.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,11 @@ fn register_not_clone() {

let _not_clone = registry.get_transient::<NotClone>().unwrap();
}

struct TupleWithStatic(&'static str);

#[test]
fn register_static_lifetime() {
let registry = Registry::empty();
registry.transient(|| TupleWithStatic("TEST"));
}

0 comments on commit 367bd91

Please sign in to comment.