diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-07-16 08:04:06 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-16 08:04:06 +0000 |
commit | d57f3b8af1498c7bb4b1eaea372270119e9845fd (patch) | |
tree | af9f07acfefd2da3776ad81711348b41bb094552 /gcc | |
parent | 41a6819f7f66363e7aa043fab1829f0bc0c3888c (diff) | |
parent | 20c8a85c2f68126244e04e66753829fe2368957a (diff) | |
download | gcc-d57f3b8af1498c7bb4b1eaea372270119e9845fd.zip gcc-d57f3b8af1498c7bb4b1eaea372270119e9845fd.tar.gz gcc-d57f3b8af1498c7bb4b1eaea372270119e9845fd.tar.bz2 |
Merge #571
571: call accept_vis directly instead of call it after get r=philberty a=thomasyonug
call accept_vis directly instead of calling it after get().
Co-authored-by: Thomas Young <wenzhang5800@gmail.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/lint/rust-lint-marklive.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/rust/lint/rust-lint-marklive.h b/gcc/rust/lint/rust-lint-marklive.h index 780b264..742175b 100644 --- a/gcc/rust/lint/rust-lint-marklive.h +++ b/gcc/rust/lint/rust-lint-marklive.h @@ -45,17 +45,17 @@ public: void visit (HIR::BorrowExpr &expr) override { - expr.get_expr ().get ()->accept_vis (*this); + expr.get_expr ()->accept_vis (*this); } void visit (HIR::DereferenceExpr &expr) override { - expr.get_expr ().get ()->accept_vis (*this); + expr.get_expr ()->accept_vis (*this); } void visit (HIR::NegationExpr &expr) override { - expr.get_expr ().get ()->accept_vis (*this); + expr.get_expr ()->accept_vis (*this); } void visit (HIR::LazyBooleanExpr &expr) override @@ -66,7 +66,7 @@ public: void visit (HIR::TypeCastExpr &expr) override { - expr.get_expr ().get ()->accept_vis (*this); + expr.get_expr ()->accept_vis (*this); } void visit (HIR::GroupedExpr &expr) override @@ -103,7 +103,7 @@ public: }); if (expr.has_expr ()) { - expr.get_final_expr ().get ()->accept_vis (*this); + expr.get_final_expr ()->accept_vis (*this); } } @@ -126,7 +126,7 @@ public: void visit (HIR::Function &function) override { - function.get_definition ().get ()->accept_vis (*this); + function.get_definition ()->accept_vis (*this); } void visit (HIR::ReturnExpr &expr) override @@ -212,7 +212,7 @@ public: { for (auto &&item : impl.get_impl_items ()) { - item.get ()->accept_vis (*this); + item->accept_vis (*this); } } @@ -239,7 +239,7 @@ public: stct.get_struct_name ().accept_vis (*this); if (stct.has_struct_base ()) { - stct.struct_base->base_struct.get ()->accept_vis (*this); + stct.struct_base->base_struct->accept_vis (*this); } } @@ -250,7 +250,7 @@ public: void visit (HIR::StructExprStructBase &stct) override { - stct.get_struct_base ()->base_struct.get ()->accept_vis (*this); + stct.get_struct_base ()->base_struct->accept_vis (*this); } private: |