]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: diagnostics: Added non-const `rich_location *` function
authorMuhammad Mahad <mahadtxt@gmail.com>
Sun, 20 Aug 2023 12:32:29 +0000 (17:32 +0500)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 18:00:33 +0000 (19:00 +0100)
commit8c04cf4cb19400aec9b51bd76e735f07bb28be07
treeece88207ecb9e654a4c65ad39a4e843e9d7415ae
parent0e65b1f9b377eb6a2464905c4060dc86d972d9d9
gccrs: diagnostics: Added non-const `rich_location *` function

Currently, gccrs using the const `rich_location &`, and
then using the cast to convert it to the functions which
was used to emit the errors, having the overloaded is
good, similiar to other frontends.

gcc/rust/ChangeLog:

* rust-diagnostics.cc (rust_be_error_at): Added overload function.
(rust_error_at): non-const `rich_location *` function.
* rust-diagnostics.h (rust_error_at): Implementation of overloaded
function.
(rust_be_error_at): likewise.
* rust_error_codes.def: Added GNU license.

Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
gcc/rust/rust-diagnostics.cc
gcc/rust/rust-diagnostics.h
gcc/rust/rust_error_codes.def