From: Pierre-Emmanuel Patry Date: Tue, 29 Jul 2025 15:33:18 +0000 (+0200) Subject: gccrs: Fix semicolon after some namespace X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=a9fdfc065c3710a26b8a77d2c5d3fc73f4be8371;p=thirdparty%2Fgcc.git gccrs: Fix semicolon after some namespace Remove namespace comment after classes and structs. gcc/rust/ChangeLog: * checks/errors/borrowck/rust-bir-fact-collector.h: Remove spurious comment. * checks/errors/rust-feature.cc: Likewise. * util/optional.h: Likewise. * expand/rust-token-tree-desugar.cc (TokenTreeDesugar::visit): Remove semicolons on namespace. * expand/rust-token-tree-desugar.h: Likewise. Signed-off-by: Pierre-Emmanuel Patry --- diff --git a/gcc/rust/checks/errors/borrowck/rust-bir-fact-collector.h b/gcc/rust/checks/errors/borrowck/rust-bir-fact-collector.h index e3a1247206d..e65b41662b6 100644 --- a/gcc/rust/checks/errors/borrowck/rust-bir-fact-collector.h +++ b/gcc/rust/checks/errors/borrowck/rust-bir-fact-collector.h @@ -883,7 +883,7 @@ protected: // Subset helpers. return region_end; } -}; // namespace BIR +}; } // namespace BIR } // namespace Rust diff --git a/gcc/rust/checks/errors/rust-feature.cc b/gcc/rust/checks/errors/rust-feature.cc index 441a1b288fd..071d3f8c0d9 100644 --- a/gcc/rust/checks/errors/rust-feature.cc +++ b/gcc/rust/checks/errors/rust-feature.cc @@ -84,7 +84,7 @@ const std::map Feature::name_hash_map = { {"exclusive_range_pattern", Feature::Name::EXCLUSIVE_RANGE_PATTERN}, {"prelude_import", Feature::Name::PRELUDE_IMPORT}, {"min_specialization", Feature::Name::MIN_SPECIALIZATION}, -}; // namespace Rust +}; tl::optional Feature::as_name (const std::string &name) diff --git a/gcc/rust/expand/rust-token-tree-desugar.cc b/gcc/rust/expand/rust-token-tree-desugar.cc index 3b471805924..aa20d50690f 100644 --- a/gcc/rust/expand/rust-token-tree-desugar.cc +++ b/gcc/rust/expand/rust-token-tree-desugar.cc @@ -68,5 +68,5 @@ TokenTreeDesugar::visit (Token &tts) } } -}; // namespace AST -}; // namespace Rust +} // namespace AST +} // namespace Rust diff --git a/gcc/rust/expand/rust-token-tree-desugar.h b/gcc/rust/expand/rust-token-tree-desugar.h index ccba53b1102..da9d732f8d8 100644 --- a/gcc/rust/expand/rust-token-tree-desugar.h +++ b/gcc/rust/expand/rust-token-tree-desugar.h @@ -49,7 +49,7 @@ private: virtual void visit (Token &tts) override; }; -}; // namespace AST -}; // namespace Rust +} // namespace AST +} // namespace Rust #endif //! RUST_TOKEN_TREE_DESUGAR_H diff --git a/gcc/rust/util/optional.h b/gcc/rust/util/optional.h index 2c59459cb94..9d2cd97cbed 100644 --- a/gcc/rust/util/optional.h +++ b/gcc/rust/util/optional.h @@ -1364,7 +1364,7 @@ public: this->m_has_value = false; } } -}; // namespace tl +}; /// Compares two optional objects template @@ -2110,7 +2110,7 @@ public: private: T *m_value; -}; // namespace tl +}; @@ -2128,4 +2128,4 @@ template struct hash> { }; } // namespace std -#endif \ No newline at end of file +#endif