[gcc r14-7906] gccrs: Basic formatting/comment fixes
Arthur Cohen
cohenarthur@gcc.gnu.org
Tue Jan 16 18:06:13 GMT 2024
https://gcc.gnu.org/g:55cf783df81fc1ee088e7d32ae100eac6c7a6fda
commit r14-7906-g55cf783df81fc1ee088e7d32ae100eac6c7a6fda
Author: Owen Avery <powerboat9.gamer@gmail.com>
Date: Wed Aug 9 12:55:37 2023 -0400
gccrs: Basic formatting/comment fixes
gcc/rust/ChangeLog:
* ast/rust-ast-collector.cc: Adjust formatting.
* checks/errors/rust-feature-gate.cc: Add trailing newline.
* rust-diagnostics.h: Remove old comment.
Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diff:
---
gcc/rust/ast/rust-ast-collector.cc | 4 +---
gcc/rust/checks/errors/rust-feature-gate.cc | 2 +-
gcc/rust/rust-diagnostics.h | 2 --
3 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/gcc/rust/ast/rust-ast-collector.cc b/gcc/rust/ast/rust-ast-collector.cc
index 3b9f457d4e1..dbc3ef2997c 100644
--- a/gcc/rust/ast/rust-ast-collector.cc
+++ b/gcc/rust/ast/rust-ast-collector.cc
@@ -2349,9 +2349,7 @@ TokenCollector::visit (MacroInvocation &invocation)
push (Rust::Token::make (EXCLAM, UNDEF_LOCATION));
visit (data.get_delim_tok_tree ());
if (invocation.has_semicolon ())
- {
- push (Rust::Token::make (SEMICOLON, UNDEF_LOCATION));
- }
+ push (Rust::Token::make (SEMICOLON, UNDEF_LOCATION));
}
void
diff --git a/gcc/rust/checks/errors/rust-feature-gate.cc b/gcc/rust/checks/errors/rust-feature-gate.cc
index 0f6b6c06582..be4ea788235 100644
--- a/gcc/rust/checks/errors/rust-feature-gate.cc
+++ b/gcc/rust/checks/errors/rust-feature-gate.cc
@@ -168,4 +168,4 @@ FeatureGate::visit (AST::ExternalTypeItem &item)
"extern types are experimental");
}
-} // namespace Rust
\ No newline at end of file
+} // namespace Rust
diff --git a/gcc/rust/rust-diagnostics.h b/gcc/rust/rust-diagnostics.h
index a2546348cfe..a38dd0d42a8 100644
--- a/gcc/rust/rust-diagnostics.h
+++ b/gcc/rust/rust-diagnostics.h
@@ -221,8 +221,6 @@ struct Error
// rust_debug uses normal printf formatting, not GCC diagnostic formatting.
#define rust_debug(...) rust_debug_loc (UNDEF_LOCATION, __VA_ARGS__)
-// rust_sorry_at wraps GCC diagnostic "sorry_at" to accept "Location" instead of
-// "location_t"
#define rust_sorry_at(location, ...) sorry_at (location, __VA_ARGS__)
void
More information about the Gcc-cvs
mailing list