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 ()});