From 94ac628fd2054a652f5ec1e96ab876ecb776a9ea Mon Sep 17 00:00:00 2001 From: andrewnaguib <24280372+ndrwnaguib@users.noreply.github.com> Date: Fri, 17 Jun 2022 06:47:17 -0700 Subject: fix #1263; wrapping gcc's "sorry_at" with "rust_sorry_at" --- gcc/rust/rust-diagnostics.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc') diff --git a/gcc/rust/rust-diagnostics.h b/gcc/rust/rust-diagnostics.h index f7a3856..93bd1b3 100644 --- a/gcc/rust/rust-diagnostics.h +++ b/gcc/rust/rust-diagnostics.h @@ -142,6 +142,11 @@ struct Error // rust_debug uses normal printf formatting, not GCC diagnostic formatting. #define rust_debug(...) rust_debug_loc (Location (), __VA_ARGS__) +// rust_sorry_at wraps GCC diagnostic "sorry_at" to accept "Location" instead of +// "location_t" +#define rust_sorry_at(location, ...) \ + sorry_at (location.gcc_location (), __VA_ARGS__) + void rust_debug_loc (const Location location, const char *fmt, ...) ATTRIBUTE_PRINTF_2; -- cgit v1.1