aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/rust-diagnostics.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/rust-diagnostics.cc')
-rw-r--r--gcc/rust/rust-diagnostics.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/rust/rust-diagnostics.cc b/gcc/rust/rust-diagnostics.cc
index 113a128..0f9eb79 100644
--- a/gcc/rust/rust-diagnostics.cc
+++ b/gcc/rust/rust-diagnostics.cc
@@ -239,7 +239,7 @@ rust_be_error_at (const RichLocation &location, const ErrorCode code,
const std::string &errmsg)
{
/* TODO: 'error_at' would like a non-'const' 'rich_location *'. */
- rich_location &gcc_loc = const_cast<rich_location &> (location.get ());
+ rich_location &gcc_loc = const_cast<rich_location &> (location);
diagnostic_metadata m;
rust_error_code_rule rule (code);
m.add_rule (rule);
@@ -311,7 +311,7 @@ void
rust_be_error_at (const RichLocation &location, const std::string &errmsg)
{
/* TODO: 'error_at' would like a non-'const' 'rich_location *'. */
- rich_location &gcc_loc = const_cast<rich_location &> (location.get ());
+ rich_location &gcc_loc = const_cast<rich_location &> (location);
error_at (&gcc_loc, "%s", errmsg.c_str ());
}