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>
"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%>");
}
}
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 }
}