https://gcc.gnu.org/g:84f772c15bca5f0ac589be5df67918b5fc141bc8

commit 84f772c15bca5f0ac589be5df67918b5fc141bc8
Author: Owen Avery <powerboat9.ga...@gmail.com>
Date:   Tue Sep 3 16:11:58 2024 -0400

    Add virtual destructor to AbstractExpr
    
    gcc/rust/ChangeLog:
    
            * checks/errors/borrowck/rust-bir.h
            (class AbstractExpr): Add virtual destructor.
    
    Signed-off-by: Owen Avery <powerboat9.ga...@gmail.com>

Diff:
---
 gcc/rust/checks/errors/borrowck/rust-bir.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/rust/checks/errors/borrowck/rust-bir.h 
b/gcc/rust/checks/errors/borrowck/rust-bir.h
index 3e4ea9a5d902..f239465676cf 100644
--- a/gcc/rust/checks/errors/borrowck/rust-bir.h
+++ b/gcc/rust/checks/errors/borrowck/rust-bir.h
@@ -172,6 +172,8 @@ class AbstractExpr : public Visitable
 public:
   explicit AbstractExpr (ExprKind kind) : kind (kind) {}
   WARN_UNUSED_RESULT ExprKind get_kind () const { return kind; }
+
+  virtual ~AbstractExpr () {}
 };
 
 class InitializerExpr : public VisitableImpl<AbstractExpr, InitializerExpr>

Reply via email to