From: Pierre-Emmanuel Patry <[email protected]>
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 <[email protected]>
---
gcc/rust/checks/errors/borrowck/rust-bir-fact-collector.h | 2 +-
gcc/rust/checks/errors/rust-feature.cc | 2 +-
gcc/rust/expand/rust-token-tree-desugar.cc | 4 ++--
gcc/rust/expand/rust-token-tree-desugar.h | 4 ++--
gcc/rust/util/optional.h | 6 +++---
5 files changed, 9 insertions(+), 9 deletions(-)
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<std::string, Feature::Name>
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::Name>
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 <class T, class U>
@@ -2110,7 +2110,7 @@ public:
private:
T *m_value;
-}; // namespace tl
+};
@@ -2128,4 +2128,4 @@ template <class T> struct hash<tl::optional<T>> {
};
} // namespace std
-#endif
\ No newline at end of file
+#endif
--
2.49.0