Skip to content

Commit

Permalink
Fix inconsistent formatting
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
braw-lee authored and CohenArthur committed Jan 16, 2024
1 parent f54df95 commit 6d85a80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gcc/rust/checks/errors/rust-ast-validation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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%>");
}
}

Expand Down
2 changes: 1 addition & 1 deletion gcc/testsuite/rust/compile/const_trait_fn.rs
Original file line number Diff line number Diff line change
@@ -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 }
}

0 comments on commit 6d85a80

Please sign in to comment.