diff mbox series

[096/125] gccrs: Fix quoted string format

Message ID 20240801145809.366388-98-arthur.cohen@embecosm.com
State New
Headers show
Series [001/125] Rust: Make 'tree'-level 'MAIN_NAME_P' work | expand

Commit Message

Arthur Cohen Aug. 1, 2024, 2:57 p.m. UTC
From: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>

This format dialog triggered a warning.

gcc/rust/ChangeLog:

	* resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::handle_use_dec):
	Replace the string format %<%s%> with the proper %qs format.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
---
 gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc b/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc
index 80b142678b9..e6da8db850c 100644
--- a/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc
+++ b/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc
@@ -499,7 +499,7 @@  TopLevel::handle_use_dec (AST::SimplePath path)
 	  auto result = node_forwarding.find (def.get_node_id ());
 	  if (result != node_forwarding.cend ()
 	      && result->second != path.get_node_id ())
-	    rust_error_at (path.get_locus (), "%<%s%> defined multiple times",
+	    rust_error_at (path.get_locus (), "%qs defined multiple times",
 			   declared_name.c_str ());
 	  else // No previous thing has inserted this into our scope
 	    node_forwarding.insert ({def.get_node_id (), path.get_node_id ()});