flag the function as inline after checking style
Signed-off-by: Jakub Doka <jakub.doka2@gmail.com>
This commit is contained in:
parent
1571938e9f
commit
8bf2d1a266
|
@ -4582,8 +4582,6 @@ impl<'a> Codegen<'a> {
|
||||||
let ast = &self.files[file];
|
let ast = &self.files[file];
|
||||||
let &Expr::Closure { args: cargs, body, .. } = expr.get(ast) else { unreachable!() };
|
let &Expr::Closure { args: cargs, body, .. } = expr.get(ast) else { unreachable!() };
|
||||||
|
|
||||||
inline |= sig.ret == ty::Id::TYPE;
|
|
||||||
|
|
||||||
let arg_count = args.len() + caller.is_some() as usize;
|
let arg_count = args.len() + caller.is_some() as usize;
|
||||||
if arg_count != cargs.len() {
|
if arg_count != cargs.len() {
|
||||||
self.error(
|
self.error(
|
||||||
|
@ -4604,6 +4602,8 @@ impl<'a> Codegen<'a> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline |= sig.ret == ty::Id::TYPE;
|
||||||
|
|
||||||
let (mut tys, mut args, mut cargs) = (sig.args.args(), args.iter(), cargs.iter());
|
let (mut tys, mut args, mut cargs) = (sig.args.args(), args.iter(), cargs.iter());
|
||||||
if is_inline || inline {
|
if is_inline || inline {
|
||||||
let var_base = self.ci.scope.vars.len();
|
let var_base = self.ci.scope.vars.len();
|
||||||
|
|
Loading…
Reference in a new issue