aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve/rust-ast-resolve-base.cc
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2024-02-22 14:59:17 +0100
committerCohenArthur <arthur.cohen@embecosm.com>2024-03-01 15:42:36 +0000
commit3ff0f1a7bf230d641503fd1d2a2dc8066a729259 (patch)
tree2ac649ca99b85fc8863d06ceff8a4185bf30ff97 /gcc/rust/resolve/rust-ast-resolve-base.cc
parentafed72d7137afe4ab4c7db44262379ba6dda4eb9 (diff)
downloadgcc-3ff0f1a7bf230d641503fd1d2a2dc8066a729259.zip
gcc-3ff0f1a7bf230d641503fd1d2a2dc8066a729259.tar.gz
gcc-3ff0f1a7bf230d641503fd1d2a2dc8066a729259.tar.bz2
lower: Add base for lowering FormatArgs nodes
gcc/rust/ChangeLog: * Make-lang.in: Compile the new source file. * ast/rust-ast-collector.cc (TokenCollector::visit): Error out when visiting FormatArgs nodes. * resolve/rust-ast-resolve-base.cc (ResolverBase::visit): Likewise. * hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): Likewise. * ast/rust-ast.cc (FormatArgs::get_locus): New. * ast/rust-builtin-ast-nodes.h: Improve FormatArgs API. * ast/rust-fmt.cc (Pieces::~Pieces): Cleanup. (Pieces::Pieces): Likewise. * ast/rust-fmt.h (struct Pieces): Add pieces_vector member. * hir/rust-ast-lower-format-args.cc: New file. * hir/rust-ast-lower-format-args.h: New file.
Diffstat (limited to 'gcc/rust/resolve/rust-ast-resolve-base.cc')
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-base.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve-base.cc b/gcc/rust/resolve/rust-ast-resolve-base.cc
index 04a0bb6..5a9f54f 100644
--- a/gcc/rust/resolve/rust-ast-resolve-base.cc
+++ b/gcc/rust/resolve/rust-ast-resolve-base.cc
@@ -653,7 +653,8 @@ ResolverBase::visit (AST::FunctionParam &)
void
ResolverBase::visit (AST::FormatArgs &fmt)
{
- rust_sorry_at (0, "unimplemented format_args!() visitor");
+ rust_sorry_at (fmt.get_locus (), "%s:%u: unimplemented FormatArgs visitor",
+ __FILE__, __LINE__);
}
} // namespace Resolver