aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/rust-session-manager.cc
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-08-30 17:13:36 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2024-01-16 19:00:34 +0100
commit11963393d073a4e54d2e25fccac2962cb66b2dd3 (patch)
tree4e67e78c4a579b7bfd707a16b10a2e2f47a283a2 /gcc/rust/rust-session-manager.cc
parenta289b3614defa2745842a58df23ca11fff583332 (diff)
downloadgcc-11963393d073a4e54d2e25fccac2962cb66b2dd3.zip
gcc-11963393d073a4e54d2e25fccac2962cb66b2dd3.tar.gz
gcc-11963393d073a4e54d2e25fccac2962cb66b2dd3.tar.bz2
gccrs: Collect error instance instead of lambda functions
Use error object instead of lambda for error collection. gcc/rust/ChangeLog: * resolve/rust-early-name-resolver-2.0.cc (Early::visit): Collect error instead of lambda. * resolve/rust-early-name-resolver-2.0.h (std::function<void): Remove type alias. * rust-diagnostics.h: Change collection type. * rust-session-manager.cc (Session::expansion): Change collection container. Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/rust/rust-session-manager.cc')
-rw-r--r--gcc/rust/rust-session-manager.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc
index 8911e7d..292506d 100644
--- a/gcc/rust/rust-session-manager.cc
+++ b/gcc/rust/rust-session-manager.cc
@@ -874,7 +874,7 @@ Session::expansion (AST::Crate &crate)
/* expand by calling cxtctxt object's monotonic_expander's expand_crate
* method. */
MacroExpander expander (crate, cfg, *this);
- std::vector<Resolver2_0::ResolveError> macro_errors;
+ std::vector<Error> macro_errors;
while (!fixed_point_reached && iterations < cfg.recursion_limit)
{
@@ -903,7 +903,7 @@ Session::expansion (AST::Crate &crate)
// Fixed point reached: Emit unresolved macros error
for (auto &error : macro_errors)
- error ();
+ error.emit ();
if (iterations == cfg.recursion_limit)
{