[gccrs COMMIT 13/19] nr: Remove unused locus in finalize_rebind_import.

gerris.rs@gmail.com gerris.rs@gmail.com
Thu Jun 4 13:13:46 GMT 2026


From: Arthur Cohen <arthur.cohen@embecosm.com>

gcc/rust/ChangeLog:

	* resolve/rust-early-name-resolver-2.0.cc
	(Early::finalize_rebind_import): Remove locus variable.
---
This change was merged into the gccrs repository and is posted here for
upstream visibility and potential drive-by review, as requested by GCC
release managers.
Each commit email contains a link to its details on github from where you can
find the Pull-Request and associated discussions.


Commit on github: https://github.com/Rust-GCC/gccrs/commit/956fb7b5873a58df2ac17371f2c7c8bb7f4fcc23

The commit has NOT been mentioned in any issue.

The commit has been mentioned in the following pull-request(s):
 - https://github.com/Rust-GCC/gccrs/pull/4551

 gcc/rust/resolve/rust-early-name-resolver-2.0.cc | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/gcc/rust/resolve/rust-early-name-resolver-2.0.cc b/gcc/rust/resolve/rust-early-name-resolver-2.0.cc
index 1d63b6392..a7c9ea664 100644
--- a/gcc/rust/resolve/rust-early-name-resolver-2.0.cc
+++ b/gcc/rust/resolve/rust-early-name-resolver-2.0.cc
@@ -505,7 +505,6 @@ Early::finalize_rebind_import (const Early::ImportPair &mapping)
   auto data = mapping.data;
 
   NodeId import_id = UNKNOWN_NODEID;
-  location_t locus = UNKNOWN_LOCATION;
   std::string declared_name;
 
   // FIXME: This needs to be done in `FinalizeImports`
@@ -513,7 +512,6 @@ Early::finalize_rebind_import (const Early::ImportPair &mapping)
     {
     case AST::UseTreeRebind::NewBindType::IDENTIFIER:
       declared_name = rebind.get_identifier ().as_string ();
-      locus = rebind.get_identifier ().get_locus ();
       import_id = rebind.get_node_id ();
       break;
     case AST::UseTreeRebind::NewBindType::NONE:
@@ -533,7 +531,6 @@ Early::finalize_rebind_import (const Early::ImportPair &mapping)
 	    declared_name = path.get_final_segment ().as_string ();
 	    import_id = path.get_final_segment ().get_node_id ();
 	  }
-	locus = path.get_final_segment ().get_locus ();
 	break;
       }
     case AST::UseTreeRebind::NewBindType::WILDCARD:
-- 
2.54.0



More information about the Gcc-rust mailing list