aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve/rust-ast-resolve-stmt.cc
diff options
context:
space:
mode:
authorSri Ganesh Thota <sriganeshthota12345@gmail.com>2025-03-25 18:30:58 +0530
committerPhilip Herron <philip.herron@embecosm.com>2025-04-04 15:54:14 +0000
commit9554470e7f876f8b05f2620ecca376c319191d1d (patch)
tree82da18d0e220b46cfcd17bd0731391efa1cf464b /gcc/rust/resolve/rust-ast-resolve-stmt.cc
parentb9aaa6192f3310a0cb26f7773b31703a8c9c544c (diff)
downloadgcc-9554470e7f876f8b05f2620ecca376c319191d1d.zip
gcc-9554470e7f876f8b05f2620ecca376c319191d1d.tar.gz
gcc-9554470e7f876f8b05f2620ecca376c319191d1d.tar.bz2
gccrs: refactoring rust_error_at "redefined multiple times"
gcc/rust/ChangeLog: * resolve/rust-ast-resolve-base.h (redefined_error): created a function for rust_error_at for redefined at multiple times. * resolve/rust-ast-resolve-implitem.h: changed rust_error_at to redefined_error. * resolve/rust-ast-resolve-stmt.cc (ResolveStmt::visit): changed rust_error_at to redefined_error. * resolve/rust-ast-resolve-stmt.h: changed rust_error_at to redefined_error. * resolve/rust-ast-resolve-toplevel.h: changed rust_error_at to redefined_error. Signed-off-by: Sri Ganesh Thota <sriganeshthota12345@gmail.com>
Diffstat (limited to 'gcc/rust/resolve/rust-ast-resolve-stmt.cc')
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-stmt.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve-stmt.cc b/gcc/rust/resolve/rust-ast-resolve-stmt.cc
index adb2db7..899249f 100644
--- a/gcc/rust/resolve/rust-ast-resolve-stmt.cc
+++ b/gcc/rust/resolve/rust-ast-resolve-stmt.cc
@@ -70,7 +70,7 @@ ResolveStmt::visit (AST::StaticItem &var)
[&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, var.get_locus ());
r.add_range (locus);
- rust_error_at (r, "defined multiple times");
+ redefined_error (r);
});
ResolveType::go (var.get_type ());