]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: 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)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 30 Jan 2024 11:36:48 +0000 (12:36 +0100)
commit9f6d3010047d417f54c439db42f111fa61b216df
treedabd91f99c521bd07787549c83340de53ff7fb8f
parentab257dcd66cd2532beb0c74b836147d02a9ed3bb
gccrs: 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