aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKushal Pal <kushalpal109@gmail.com>2024-01-16 19:06:35 +0530
committerArthur Cohen <arthur.cohen@embecosm.com>2024-01-30 12:36:51 +0100
commitf7c8a712be233f492b21bb1a4c4a3aa5f07b184b (patch)
tree890634e864b8453d29d4b8b5740090959e80d712 /gcc
parentf46fdb6399d91d56f095088c8cf0f1fd6d971e25 (diff)
downloadgcc-f7c8a712be233f492b21bb1a4c4a3aa5f07b184b.zip
gcc-f7c8a712be233f492b21bb1a4c4a3aa5f07b184b.tar.gz
gcc-f7c8a712be233f492b21bb1a4c4a3aa5f07b184b.tar.bz2
gccrs: Fix inconsistent formatting
gcc/rust/ChangeLog: * checks/errors/rust-ast-validation.cc (ASTValidation::visit): Enclose const in single quotes. gcc/testsuite/ChangeLog: * rust/compile/const_trait_fn.rs: Enclose const in single quotes. Signed-off-by: Kushal Pal <kushalpal109@gmail.com>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/checks/errors/rust-ast-validation.cc2
-rw-r--r--gcc/testsuite/rust/compile/const_trait_fn.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/gcc/rust/checks/errors/rust-ast-validation.cc b/gcc/rust/checks/errors/rust-ast-validation.cc
index 0ed5d06..ccb071f 100644
--- a/gcc/rust/checks/errors/rust-ast-validation.cc
+++ b/gcc/rust/checks/errors/rust-ast-validation.cc
@@ -149,7 +149,7 @@ ASTValidation::visit (AST::TraitFunctionDecl &decl)
"functions in traits cannot be declared %<async%>");
if (qualifiers.is_const ())
rust_error_at (decl.get_identifier ().get_locus (), ErrorCode::E0379,
- "functions in traits cannot be declared const");
+ "functions in traits cannot be declared %<const%>");
}
}
diff --git a/gcc/testsuite/rust/compile/const_trait_fn.rs b/gcc/testsuite/rust/compile/const_trait_fn.rs
index cff2f5f..41bba3b 100644
--- a/gcc/testsuite/rust/compile/const_trait_fn.rs
+++ b/gcc/testsuite/rust/compile/const_trait_fn.rs
@@ -1,4 +1,4 @@
trait Osterkz {
const fn x();
- // { dg-error "functions in traits cannot be declared const .E0379." "" { target *-*-* } .-1 }
+ // { dg-error "functions in traits cannot be declared .const." "" { target *-*-* } .-1 }
}