From 87172a8bf9fe577be000b389ff8a45d5fcb326dc Mon Sep 17 00:00:00 2001 From: Muhammad Mahad Date: Tue, 8 Aug 2023 18:39:29 +0500 Subject: gccrs: [E0015] Use of non-const inside const gcc/rust/ChangeLog: * checks/errors/rust-const-checker.cc (ConstChecker::check_function_call): Added errorcode. Signed-off-by: Muhammad Mahad --- gcc/rust/checks/errors/rust-const-checker.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/rust/checks/errors/rust-const-checker.cc b/gcc/rust/checks/errors/rust-const-checker.cc index 4361834..599854a 100644 --- a/gcc/rust/checks/errors/rust-const-checker.cc +++ b/gcc/rust/checks/errors/rust-const-checker.cc @@ -339,8 +339,9 @@ ConstChecker::check_function_call (HirId fn_id, location_t locus) } if (is_error) - rust_error_at (locus, "only functions marked as % are allowed to " - "be called from constant contexts"); + rust_error_at (locus, ErrorCode::E0015, + "only functions marked as % are allowed to be " + "called from constant contexts"); } void -- cgit v1.1