wip: finally, informative type errors from the macro
Some checks failed
/ build (push) Has been cancelled

fixin mixin
This commit is contained in:
🪞👃🪞 2025-05-21 15:54:25 +03:00
parent abc87d3234
commit 583660c330
10 changed files with 152 additions and 205 deletions

View file

@ -84,7 +84,7 @@ impl ToTokens for CommandDef {
let mut out = TokenStream2::new();
for (arg, ty) in arm.args() {
write_quote_to(&mut out, quote! {
#arg: Namespace::take_from_or_fail(self, words)?,
#arg: Provide::provide_or_fail(self, words)?,
});
}
out
@ -149,8 +149,8 @@ impl ToTokens for CommandDef {
}
}
/// Generated by [tengri_proc::command].
impl ::tengri::dsl::Namespace<#state> for #command_enum {
fn take_from <'source> (
impl<'n> ::tengri::dsl::Provide<'n, #state> for #command_enum {
fn provide <'source> (
state: &#state,
words: &mut ::tengri::dsl::TokenIter<'source>
) -> Perhaps<Self> {