]> git.ipfire.org Git - thirdparty/gcc.git/commit
format-args: Fix Rust interface and add input parsing.
authorArthur Cohen <arthur.cohen@embecosm.com>
Fri, 16 Feb 2024 17:27:22 +0000 (18:27 +0100)
committerCohenArthur <arthur.cohen@embecosm.com>
Fri, 1 Mar 2024 15:42:36 +0000 (15:42 +0000)
commitafed72d7137afe4ab4c7db44262379ba6dda4eb9
tree24d8b8c13d34bd86db7094b134e19e255def747e
parent38e3cffdbdee48cc4793948f1551b075672f6fdd
format-args: Fix Rust interface and add input parsing.

gcc/rust/ChangeLog:

* Make-lang.in: Do not build Rust library in release mode.
* ast/rust-ast.cc: Make FormatArgs inherit from AST::Expr
* ast/rust-builtin-ast-nodes.h: Improve FormatArg* nodes and helpers.
* ast/rust-fmt.cc (Pieces::collect): Fix interface to match FFI function.
* ast/rust-fmt.h (collect_pieces): Likewise.
(struct Pieces): Add append_newline parameter.
* expand/rust-macro-builtins.cc: Add proper parsing of format_args
input.
* hir/rust-ast-lower-base.cc: Include diagnostics header.

libgrust/ChangeLog:

* libformat_parser/src/lib.rs: Switch interface to use more parser
parameters.
* libformat_parser/src/bin.rs: Use new interface.
gcc/rust/Make-lang.in
gcc/rust/ast/rust-ast.cc
gcc/rust/ast/rust-builtin-ast-nodes.h
gcc/rust/ast/rust-fmt.cc
gcc/rust/ast/rust-fmt.h
gcc/rust/expand/rust-macro-builtins.cc
gcc/rust/hir/rust-ast-lower-base.cc
libgrust/libformat_parser/src/bin.rs
libgrust/libformat_parser/src/lib.rs