Simply use get_locus () on the ImplItem.
Both the generics7.rs and generics8.rs testcase still pass.
---
.../rust-hir-inherent-impl-overlap.h | 45 +--
1 file changed, 2 insertions(+), 43 deletions(-)
diff --git a/gcc/rust/typecheck/rust-hir-inherent-impl-overlap.h
b/gcc
Hi,
Here are a couple of little patches to improve or simplify locations a
bit:
[PATCH 1/3] Use location when lowering TupleField
[PATCH 2/3] Replace HIRItem::get_impl_locus with HirItem::get_locus
[PATCH 3/3] Remove GetLocusFromImplItem visitor
Also on https://code.wildebeest.org/git/user/mj
HIRItem::get_impl_locus wasn't used and all subclasses already
implement get_locus.
---
gcc/rust/hir/tree/rust-hir-item.h | 6 --
gcc/rust/hir/tree/rust-hir.h | 2 +-
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/gcc/rust/hir/tree/rust-hir-item.h
b/gcc/rust/hir/tree/rust-
---
gcc/rust/hir/rust-ast-lower-stmt.h | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/gcc/rust/hir/rust-ast-lower-stmt.h
b/gcc/rust/hir/rust-ast-lower-stmt.h
index 1e72c8a2023..fdd5041d602 100644
--- a/gcc/rust/hir/rust-ast-lower-stmt.h
+++ b/gcc/rust/hir/rust-ast-lower