[PATCH 3/3] Remove GetLocusFromImplItem visitor

2021-08-28 Thread Mark Wielaard
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

A few more location patches

2021-08-28 Thread Mark Wielaard
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

[PATCH 2/3] Replace HIRItem::get_impl_locus with HirItem::get_locus

2021-08-28 Thread Mark Wielaard
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-

[PATCH 1/3] Use location when lowering TupleField

2021-08-28 Thread Mark Wielaard
--- 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