mirror of
https://github.com/Astatin3/unshell.git
synced 2026-06-08 22:38:01 -06:00
Tighten compile-time leaf inventory checks
This commit is contained in:
@@ -167,6 +167,7 @@ pub(crate) fn expand_leaf_declaration(input: LeafDeclarationInput) -> Result<Tok
|
||||
.iter()
|
||||
.map(|procedure| LitStr::new(&normalize_suffix(&procedure.to_string()), procedure.span()))
|
||||
.collect::<Vec<_>>();
|
||||
let procedure_type_checks = input.procedures.iter();
|
||||
|
||||
let endpoint_impl = input
|
||||
.endpoint_struct
|
||||
@@ -225,6 +226,10 @@ pub(crate) fn expand_leaf_declaration(input: LeafDeclarationInput) -> Result<Tok
|
||||
}
|
||||
}
|
||||
|
||||
const _: fn() = || {
|
||||
#(let _ = ::core::marker::PhantomData::<#procedure_type_checks>;)*
|
||||
};
|
||||
|
||||
#endpoint_impl
|
||||
#tui_impl
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user