aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/rust/hir/tree/rust-hir-pattern.h2
-rw-r--r--gcc/rust/hir/tree/rust-hir.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/gcc/rust/hir/tree/rust-hir-pattern.h b/gcc/rust/hir/tree/rust-hir-pattern.h
index fd4960f..3d0dd52 100644
--- a/gcc/rust/hir/tree/rust-hir-pattern.h
+++ b/gcc/rust/hir/tree/rust-hir-pattern.h
@@ -404,6 +404,8 @@ public:
return mappings;
}
+ Location get_locus () const override final { return locus; }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
diff --git a/gcc/rust/hir/tree/rust-hir.h b/gcc/rust/hir/tree/rust-hir.h
index 8b5f3bb..b7abe67 100644
--- a/gcc/rust/hir/tree/rust-hir.h
+++ b/gcc/rust/hir/tree/rust-hir.h
@@ -330,6 +330,8 @@ public:
virtual Analysis::NodeMapping get_pattern_mappings () const = 0;
+ virtual Location get_locus () const = 0;
+
protected:
// Clone pattern implementation as pure virtual method
virtual Pattern *clone_pattern_impl () const = 0;