]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Fix inconsistent formatting
authorKushal Pal <kushalpal109@gmail.com>
Tue, 16 Jan 2024 13:36:35 +0000 (19:06 +0530)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 30 Jan 2024 11:36:51 +0000 (12:36 +0100)
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>
gcc/rust/checks/errors/rust-ast-validation.cc
gcc/testsuite/rust/compile/const_trait_fn.rs

index 0ed5d06089431346bb2706e201cba0f15253c926..ccb071f74b09055067f24dacea46abb5393eefc3 100644 (file)
@@ -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%>");
     }
 }
 
index cff2f5f096e5dcd7836e83cf92437e6d2b571568..41bba3b533583f99566e44283b7fc68d6fab0c63 100644 (file)
@@ -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 }
 }