From b1eff151c5c8dcb0cbf410307591c6944d3ddf0e Mon Sep 17 00:00:00 2001 From: Jakub Dupak Date: Mon, 11 Dec 2023 22:09:07 +0100 Subject: [PATCH] BIR: Cleanup gcc/rust/ChangeLog: * checks/errors/borrowck/rust-bir-place.h: Cleanup. * checks/errors/borrowck/rust-borrow-checker.h: Cleanup. Signed-off-by: Jakub Dupak --- gcc/rust/checks/errors/borrowck/rust-bir-place.h | 2 +- gcc/rust/checks/errors/borrowck/rust-borrow-checker.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/rust/checks/errors/borrowck/rust-bir-place.h b/gcc/rust/checks/errors/borrowck/rust-bir-place.h index 8c2df47c11d1..523c2f6ec904 100644 --- a/gcc/rust/checks/errors/borrowck/rust-bir-place.h +++ b/gcc/rust/checks/errors/borrowck/rust-bir-place.h @@ -211,7 +211,7 @@ class PlaceDB auto lookup = lookup_variable (id); if (lookup != INVALID_PLACE) return lookup; - places.push_back ( + add_place ( {Place::VARIABLE, id, {}, is_type_copy (tyty), false, NO_LIFETIME, tyty}); return places.size () - 1; }; diff --git a/gcc/rust/checks/errors/borrowck/rust-borrow-checker.h b/gcc/rust/checks/errors/borrowck/rust-borrow-checker.h index 549af3560e9b..e1a3f191c873 100644 --- a/gcc/rust/checks/errors/borrowck/rust-borrow-checker.h +++ b/gcc/rust/checks/errors/borrowck/rust-borrow-checker.h @@ -30,7 +30,8 @@ class BorrowChecker public: explicit BorrowChecker (bool enable_dump_bir) - : enable_dump_bir (enable_dump_bir){}; + : enable_dump_bir (enable_dump_bir) + {} /** Perform borrow-checking using polonius on an entire crate */ void go (HIR::Crate &crate);