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