Skip to content

Commit 03e6439

Browse files
kkysenRua
andcommitted
transpile: rename e to val in fn convert_pointer_is_null
Co-authored-by: Rua <ruawhitepaw@gmail.com>
1 parent 4887dce commit 03e6439

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

c2rust-transpile/src/translator/pointers.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -569,12 +569,12 @@ impl<'c> Translation<'c> {
569569
&self,
570570
ctx: ExprContext,
571571
ptr_type: CTypeId,
572-
e: Box<Expr>,
572+
val: Box<Expr>,
573573
is_null: bool,
574574
) -> TranslationResult<Box<Expr>> {
575575
Ok(if self.ast_context.is_function_pointer(ptr_type) {
576576
let method = if is_null { "is_none" } else { "is_some" };
577-
mk().method_call_expr(e, method, vec![])
577+
mk().method_call_expr(val, method, vec![])
578578
} else {
579579
// TODO: `pointer::is_null` becomes stably const in Rust 1.84.
580580
if ctx.is_const {
@@ -583,11 +583,11 @@ impl<'c> Translation<'c> {
583583
"cannot check nullity of pointer in `const` context",
584584
));
585585
}
586-
let is_null_val = mk().method_call_expr(e, "is_null", vec![]);
586+
let val = mk().method_call_expr(val, "is_null", vec![]);
587587
if !is_null {
588-
mk().unary_expr(UnOp::Not(Default::default()), is_null_val)
588+
mk().unary_expr(UnOp::Not(Default::default()), val)
589589
} else {
590-
is_null_val
590+
val
591591
}
592592
})
593593
}

0 commit comments

Comments
 (0)