aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/rust-diagnostics.cc
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2022-07-21 18:35:35 -0400
committerArthur Cohen <arthur.cohen@embecosm.com>2022-08-29 10:39:36 +0200
commitbc2fe97fad18ba518279b7058512606bc99cc2ca (patch)
treecd802e34bf2e896ec27ff69fc05cdec4037c4af2 /gcc/rust/rust-diagnostics.cc
parent05f1f87274a4ed13c0ab84de77d4253776b46637 (diff)
downloadgcc-bc2fe97fad18ba518279b7058512606bc99cc2ca.zip
gcc-bc2fe97fad18ba518279b7058512606bc99cc2ca.tar.gz
gcc-bc2fe97fad18ba518279b7058512606bc99cc2ca.tar.bz2
Experiment with adding an error code to an error
Diffstat (limited to 'gcc/rust/rust-diagnostics.cc')
-rw-r--r--gcc/rust/rust-diagnostics.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/rust/rust-diagnostics.cc b/gcc/rust/rust-diagnostics.cc
index c2d3e4e..79daf6b 100644
--- a/gcc/rust/rust-diagnostics.cc
+++ b/gcc/rust/rust-diagnostics.cc
@@ -167,6 +167,17 @@ rust_error_at (const Location location, const char *fmt, ...)
}
void
+rust_error_at (const RichLocation &location, const ErrorCode code,
+ const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start (ap, fmt);
+ rust_be_error_at (location, code, expand_message (fmt, ap));
+ va_end (ap);
+}
+
+void
rust_warning_at (const Location location, int opt, const char *fmt, ...)
{
va_list ap;