]> git.ipfire.org Git - thirdparty/gcc.git/commit
Make feature gate visitor inherit from default one
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Fri, 24 Nov 2023 10:17:52 +0000 (11:17 +0100)
committerP-E-P <32375388+P-E-P@users.noreply.github.com>
Fri, 1 Dec 2023 10:12:57 +0000 (10:12 +0000)
commit48942f64d51d215d6b8b1d84bbd648960afaaf60
treeec7993baebc3cf8eabdb223290ae77d9f629a2b4
parent0d6d39457d02f48aafcbc93186775cd8ca6b2117
Make feature gate visitor inherit from default one

The feature gating behavior may be shortened and kept cleaner using the
default visitor. This means less maintenance on visit functions as the
traversal is shared by multiple visitors.

gcc/rust/ChangeLog:

* checks/errors/rust-feature-gate.cc (FeatureGate::visit): Add a visit
function for the crate level.
(FeatureGate::check): Add call to crate visit.
* checks/errors/rust-feature-gate.h (class FeatureGate): Remove now
useless visit functions (traversal only).

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/checks/errors/rust-feature-gate.cc
gcc/rust/checks/errors/rust-feature-gate.h