Skip to content

Commit 647877a

Browse files
committed
Inlining the nested function inside the entry implementation gives better code size.
1 parent db5a835 commit 647877a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

macros/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ pub fn entry(args: TokenStream, input: TokenStream) -> TokenStream {
220220
#[export_name = "main"]
221221
#(#attrs)*
222222
pub #unsafety fn #hash() -> ! {
223+
#[inline(always)]
223224
#unsafety fn #hash<'a>(#fn_param) -> ! {
224225
#(#vars)*
225226
#(#stmts)*

0 commit comments

Comments
 (0)