File tree Expand file tree Collapse file tree
c2rust-transpile/src/translator Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments