Commit Message
Arthur Cohen
Aug. 1, 2024, 2:57 p.m. UTC
From: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> We need to visit subcomponents in unsafe elements, this means we can leverage the default ast visitor's code instead of duplicating it. gcc/rust/ChangeLog: * resolve/rust-default-resolver.cc (DefaultResolver::visit): Remove empty visit function. * resolve/rust-default-resolver.h: Remove function prototype. Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> --- gcc/rust/resolve/rust-default-resolver.cc | 4 ---- gcc/rust/resolve/rust-default-resolver.h | 1 - 2 files changed, 5 deletions(-)
diff --git a/gcc/rust/resolve/rust-default-resolver.cc b/gcc/rust/resolve/rust-default-resolver.cc index 291731be5b3..393994808ee 100644 --- a/gcc/rust/resolve/rust-default-resolver.cc +++ b/gcc/rust/resolve/rust-default-resolver.cc @@ -235,10 +235,6 @@ void DefaultResolver::visit (AST::ReturnExpr &expr) {} -void -DefaultResolver::visit (AST::UnsafeBlockExpr &expr) -{} - void DefaultResolver::visit (AST::LoopExpr &expr) {} diff --git a/gcc/rust/resolve/rust-default-resolver.h b/gcc/rust/resolve/rust-default-resolver.h index 0a6427ca6a6..547b5376bfc 100644 --- a/gcc/rust/resolve/rust-default-resolver.h +++ b/gcc/rust/resolve/rust-default-resolver.h @@ -66,7 +66,6 @@ public: void visit (AST::RangeFromToInclExpr &); void visit (AST::RangeToInclExpr &); void visit (AST::ReturnExpr &); - void visit (AST::UnsafeBlockExpr &); void visit (AST::LoopExpr &); void visit (AST::WhileLoopExpr &); void visit (AST::WhileLetLoopExpr &);