Skip to content

Commit

Permalink
analyze: fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
spernsteiner committed Apr 22, 2024
1 parent b1728e6 commit 7b99d25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion c2rust-analyze/src/borrowck/type_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,9 @@ impl<'tcx> TypeChecker<'tcx, '_> {
});
}
Callee::Null { .. } => {
// TODO: do we need to do anything here?
// Just visit the place. The null pointer returned here has no origin, so
// there's no need to call `do_assign` to set up subset relations.
let _pl_lty = self.visit_place(destination);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion c2rust-analyze/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ fn builtin_callee<'tcx>(tcx: TyCtxt<'tcx>, did: DefId, substs: SubstsRef<'tcx>)
}

"null" | "null_mut" => {
// The `core::mem::size_of` function.
// The `core::ptr::null/null_mut` function.
let parent_did = tcx.parent(did);
if tcx.def_kind(parent_did) != DefKind::Mod {
return None;
Expand Down

0 comments on commit 7b99d25

Please sign in to comment.