From 0ad311074e3d49a66174f59c47c4d6183ce7e3a0 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Fri, 29 May 2020 14:50:28 +0200 Subject: allow handlers to be named 'main' `#[init]`, `#[idle]` and `#[task]` handlers can now be named `main` fixes #311 --- macros/src/codegen/init.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'macros/src/codegen/init.rs') diff --git a/macros/src/codegen/init.rs b/macros/src/codegen/init.rs index 9c8ce31c..fc2faa34 100644 --- a/macros/src/codegen/init.rs +++ b/macros/src/codegen/init.rs @@ -105,7 +105,7 @@ pub fn codegen( let locals_new = locals_new.iter(); let call_init = - Some(quote!(let late = #name(#(#locals_new,)* #name::Context::new(core.into()));)); + Some(quote!(let late = crate::#name(#(#locals_new,)* #name::Context::new(core.into()));)); root_init.push(module::codegen(Context::Init(core), needs_lt, app, extra)); -- cgit v1.2.3