Include lb_tasklib::spawn in globals

This commit is contained in:
2025-06-26 17:52:31 +10:00
parent 0cafac0948
commit 24c5e9edc2
3 changed files with 9 additions and 2 deletions

View File

@@ -62,12 +62,12 @@ fn generate_impls(_args: &Args, imp: &mut ItemImpl) -> Result<TokenStream> {
imp.attrs.retain(|attr| {
if attr.path().is_ident("include") {
if let Ok(path) = attr.parse_args::<LitStr>() {
registry.build.push(quote_spanned!(attr.span() =>
registry.build.push(quote_spanned!(path.span() =>
b.include_lua(::std::include_str!(#path));
));
return false;
} else if let Ok(chunk) = attr.parse_args::<Block>() {
registry.build.push(quote_spanned!(attr.span() =>
registry.build.push(quote_spanned!(chunk.span() =>
b.include_lua(#ffi::__internal::luaify_chunk!(#chunk));
));
return false;