<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gcc.git/libgrust/libformat_parser, branch releases/gcc-15</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/'/>
<entry>
<title>rust: Lower minimum supported Rust version to 1.49</title>
<updated>2025-03-31T19:07:15+00:00</updated>
<author>
<name>Arthur Cohen</name>
<email>arthur.cohen@embecosm.com</email>
</author>
<published>2025-03-24T14:32:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=d560f3f95943394ed630d9baf0c5268b4be4b9aa'/>
<id>d560f3f95943394ed630d9baf0c5268b4be4b9aa</id>
<content type='text'>
gcc/rust/ChangeLog:

	* checks/errors/borrowck/ffi-polonius/Cargo.lock: Regenerate.
	* checks/errors/borrowck/ffi-polonius/Cargo.toml: Update to use source patching instead of
	vendoring, lower edition to 2018.
	* checks/errors/borrowck/ffi-polonius/vendor/log/Cargo.toml: Change edition to 2018.
	* checks/errors/borrowck/ffi-polonius/vendor/log/src/lib.rs: Remove uses of unstable
	feature.
	* checks/errors/borrowck/ffi-polonius/.cargo/config.toml: Removed.

libgrust/ChangeLog:

	* libformat_parser/Makefile.am: Avoid using --config as it is unsupported by cargo 1.49.
	* libformat_parser/Makefile.in: Regenerate.
	* libformat_parser/generic_format_parser/src/lib.rs: Use extension trait for missing
	features.
	* libformat_parser/src/lib.rs: Likewise.
	* libformat_parser/.cargo/config: Moved to...
	* libformat_parser/.cargo/config.toml: ...here.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gcc/rust/ChangeLog:

	* checks/errors/borrowck/ffi-polonius/Cargo.lock: Regenerate.
	* checks/errors/borrowck/ffi-polonius/Cargo.toml: Update to use source patching instead of
	vendoring, lower edition to 2018.
	* checks/errors/borrowck/ffi-polonius/vendor/log/Cargo.toml: Change edition to 2018.
	* checks/errors/borrowck/ffi-polonius/vendor/log/src/lib.rs: Remove uses of unstable
	feature.
	* checks/errors/borrowck/ffi-polonius/.cargo/config.toml: Removed.

libgrust/ChangeLog:

	* libformat_parser/Makefile.am: Avoid using --config as it is unsupported by cargo 1.49.
	* libformat_parser/Makefile.in: Regenerate.
	* libformat_parser/generic_format_parser/src/lib.rs: Use extension trait for missing
	features.
	* libformat_parser/src/lib.rs: Likewise.
	* libformat_parser/.cargo/config: Moved to...
	* libformat_parser/.cargo/config.toml: ...here.
</pre>
</div>
</content>
</entry>
<entry>
<title>gccrs: Fix ffi and enum conventions</title>
<updated>2025-03-17T15:35:53+00:00</updated>
<author>
<name>badumbatish</name>
<email>tanghocle456@gmail.com</email>
</author>
<published>2024-07-23T20:21:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=9afadf56ca5ea97e73135891ef7a772a866ac630'/>
<id>9afadf56ca5ea97e73135891ef7a772a866ac630</id>
<content type='text'>
gcc/rust/ChangeLog:

	* ast/rust-fmt.h (enum ParseMode):
	Drop typedef in Cpp

libgrust/ChangeLog:

	* libformat_parser/generic_format_parser/src/lib.rs:
	Remove repr(C)
	* libformat_parser/src/bin.rs: Use ffi
	* libformat_parser/src/lib.rs: pub ffi, create ParseMode and match
	rustc's parse mode
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gcc/rust/ChangeLog:

	* ast/rust-fmt.h (enum ParseMode):
	Drop typedef in Cpp

libgrust/ChangeLog:

	* libformat_parser/generic_format_parser/src/lib.rs:
	Remove repr(C)
	* libformat_parser/src/bin.rs: Use ffi
	* libformat_parser/src/lib.rs: pub ffi, create ParseMode and match
	rustc's parse mode
</pre>
</div>
</content>
</entry>
<entry>
<title>gccrs: Added options for ParseMode</title>
<updated>2025-03-17T15:35:53+00:00</updated>
<author>
<name>badumbatish</name>
<email>tanghocle456@gmail.com</email>
</author>
<published>2024-07-20T07:44:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=29873023eddd5b1a71fec048431cb90186e23704'/>
<id>29873023eddd5b1a71fec048431cb90186e23704</id>
<content type='text'>
gcc/rust/ChangeLog:

	* ast/rust-fmt.cc (Pieces::collect):
	Added options for ParseMode
	* ast/rust-fmt.h (collect_pieces): Likewise.
	(struct Pieces): Likewise.
	* expand/rust-macro-builtins-format-args.cc (MacroBuiltin::format_args_handler):
	Likewise.

libgrust/ChangeLog:

	* libformat_parser/generic_format_parser/src/lib.rs: Likewise.
	* libformat_parser/src/bin.rs: Likewise.
	* libformat_parser/src/lib.rs: Likewise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gcc/rust/ChangeLog:

	* ast/rust-fmt.cc (Pieces::collect):
	Added options for ParseMode
	* ast/rust-fmt.h (collect_pieces): Likewise.
	(struct Pieces): Likewise.
	* expand/rust-macro-builtins-format-args.cc (MacroBuiltin::format_args_handler):
	Likewise.

libgrust/ChangeLog:

	* libformat_parser/generic_format_parser/src/lib.rs: Likewise.
	* libformat_parser/src/bin.rs: Likewise.
	* libformat_parser/src/lib.rs: Likewise.
</pre>
</div>
</content>
</entry>
<entry>
<title>gccrs: Fix nightly rustc warnings</title>
<updated>2025-03-17T15:35:52+00:00</updated>
<author>
<name>Kushal Pal</name>
<email>kushalpal109@gmail.com</email>
</author>
<published>2024-06-24T12:07:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=d9167a76f4dc2d3060becb8a8fa47d49d827d213'/>
<id>d9167a76f4dc2d3060becb8a8fa47d49d827d213</id>
<content type='text'>
libgrust/ChangeLog:

	* libformat_parser/Cargo.toml:
	Used crate-type instead of depricated crate_type.
	* libformat_parser/generic_format_parser/src/lib.rs:
	Remove dead code.
	* libformat_parser/src/lib.rs: Likewise.

Signed-off-by: Kushal Pal &lt;kushalpal109@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
libgrust/ChangeLog:

	* libformat_parser/Cargo.toml:
	Used crate-type instead of depricated crate_type.
	* libformat_parser/generic_format_parser/src/lib.rs:
	Remove dead code.
	* libformat_parser/src/lib.rs: Likewise.

Signed-off-by: Kushal Pal &lt;kushalpal109@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Rust: libformat_parser: Lower minimum Rust version to 1.49</title>
<updated>2024-12-09T09:48:40+00:00</updated>
<author>
<name>Arthur Cohen</name>
<email>arthur.cohen@embecosm.com</email>
</author>
<published>2024-04-23T12:13:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=be38c37fdc35e7f77dbab16736782cfe24769e77'/>
<id>be38c37fdc35e7f77dbab16736782cfe24769e77</id>
<content type='text'>
libgrust/ChangeLog:

	* libformat_parser/Cargo.toml: Change Rust edition from 2021 to 2018.
	* libformat_parser/generic_format_parser/Cargo.toml: Likewise.
	* libformat_parser/generic_format_parser/src/lib.rs: Remove usage of
	then-unstable std features and language constructs.
	* libformat_parser/src/lib.rs: Likewise, plus provide extension trait
	for String::leak.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
libgrust/ChangeLog:

	* libformat_parser/Cargo.toml: Change Rust edition from 2021 to 2018.
	* libformat_parser/generic_format_parser/Cargo.toml: Likewise.
	* libformat_parser/generic_format_parser/src/lib.rs: Remove usage of
	then-unstable std features and language constructs.
	* libformat_parser/src/lib.rs: Likewise, plus provide extension trait
	for String::leak.
</pre>
</div>
</content>
</entry>
<entry>
<title>Rust: Work around 'error[E0599]: no method named `leak` found for struct `std::string::String` in the current scope'</title>
<updated>2024-12-09T09:48:40+00:00</updated>
<author>
<name>Thomas Schwinge</name>
<email>tschwinge@baylibre.com</email>
</author>
<published>2024-08-03T14:39:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=9e4a87ceb31d5c25cb7163ed8016986f0adbc68f'/>
<id>9e4a87ceb31d5c25cb7163ed8016986f0adbc68f</id>
<content type='text'>
Compiling with Debian GNU/Linux 12 (bookworm) packages:

    $ apt-cache madison cargo rustc
         cargo | 0.66.0+ds1-1 | http://deb.debian.org/debian bookworm/main ppc64el Packages
         cargo | 0.66.0+ds1-1 | http://deb.debian.org/debian bookworm/main Sources
         rustc | 1.63.0+dfsg1-2 | http://deb.debian.org/debian bookworm/main ppc64el Packages
         rustc | 1.63.0+dfsg1-2 | http://deb.debian.org/debian bookworm/main Sources

..., we run into:

       Compiling libformat_parser v0.1.0 ([...]/source-gcc/libgrust/libformat_parser)
    error[E0599]: no method named `leak` found for struct `std::string::String` in the current scope
       --&gt; src/lib.rs:396:18
        |
    396 |         ptr: str.leak().as_ptr(),
        |                  ^^^^ method not found in `std::string::String`

    error[E0599]: no method named `leak` found for struct `std::string::String` in the current scope
       --&gt; src/lib.rs:434:7
        |
    434 |     s.leak();
        |       ^^^^ method not found in `std::string::String`

    error[E0599]: no method named `leak` found for struct `std::string::String` in the current scope
       --&gt; src/lib.rs:439:23
        |
    439 |         ptr: cloned_s.leak().as_ptr(),
        |                       ^^^^ method not found in `std::string::String`

Locally replace 1.72.0+ method 'leak' for struct 'std::string::String'.

	libgrust/
	* libformat_parser/src/lib.rs: Work around 'error[E0599]:
	no method named `leak` found for struct `std::string::String` in the current scope'.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Compiling with Debian GNU/Linux 12 (bookworm) packages:

    $ apt-cache madison cargo rustc
         cargo | 0.66.0+ds1-1 | http://deb.debian.org/debian bookworm/main ppc64el Packages
         cargo | 0.66.0+ds1-1 | http://deb.debian.org/debian bookworm/main Sources
         rustc | 1.63.0+dfsg1-2 | http://deb.debian.org/debian bookworm/main ppc64el Packages
         rustc | 1.63.0+dfsg1-2 | http://deb.debian.org/debian bookworm/main Sources

..., we run into:

       Compiling libformat_parser v0.1.0 ([...]/source-gcc/libgrust/libformat_parser)
    error[E0599]: no method named `leak` found for struct `std::string::String` in the current scope
       --&gt; src/lib.rs:396:18
        |
    396 |         ptr: str.leak().as_ptr(),
        |                  ^^^^ method not found in `std::string::String`

    error[E0599]: no method named `leak` found for struct `std::string::String` in the current scope
       --&gt; src/lib.rs:434:7
        |
    434 |     s.leak();
        |       ^^^^ method not found in `std::string::String`

    error[E0599]: no method named `leak` found for struct `std::string::String` in the current scope
       --&gt; src/lib.rs:439:23
        |
    439 |         ptr: cloned_s.leak().as_ptr(),
        |                       ^^^^ method not found in `std::string::String`

Locally replace 1.72.0+ method 'leak' for struct 'std::string::String'.

	libgrust/
	* libformat_parser/src/lib.rs: Work around 'error[E0599]:
	no method named `leak` found for struct `std::string::String` in the current scope'.
</pre>
</div>
</content>
</entry>
<entry>
<title>Rust: Work around 'error[E0658]: `let...else` statements are unstable'</title>
<updated>2024-12-09T09:48:40+00:00</updated>
<author>
<name>Thomas Schwinge</name>
<email>tschwinge@baylibre.com</email>
</author>
<published>2024-08-03T14:08:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=85f81ba60e37c6d6df8a0d263f9335dae18e8cae'/>
<id>85f81ba60e37c6d6df8a0d263f9335dae18e8cae</id>
<content type='text'>
Compiling with Debian GNU/Linux 12 (bookworm) packages:

    $ apt-cache madison cargo rustc
         cargo | 0.66.0+ds1-1 | http://deb.debian.org/debian bookworm/main ppc64el Packages
         cargo | 0.66.0+ds1-1 | http://deb.debian.org/debian bookworm/main Sources
         rustc | 1.63.0+dfsg1-2 | http://deb.debian.org/debian bookworm/main ppc64el Packages
         rustc | 1.63.0+dfsg1-2 | http://deb.debian.org/debian bookworm/main Sources

..., we run into:

       Compiling generic_format_parser v0.1.0 ([...]/source-gcc/libgrust/libformat_parser/generic_format_parser)
    error[E0658]: `let...else` statements are unstable
       --&gt; generic_format_parser/src/lib.rs:994:5
        |
    994 | /     let Some(unescaped) = unescape_string(snippet) else {
    995 | |         return InputStringKind::NotALiteral;
    996 | |     };
        | |______^
        |
        = note: see issue #87335 &lt;https://github.com/rust-lang/rust/issues/87335&gt; for more information

Rewrite backwards, per &lt;https://rust-lang.github.io/rfcs/3137-let-else.html&gt;.

	libgrust/
	* libformat_parser/generic_format_parser/src/lib.rs: Work around
	'error[E0658]: `let...else` statements are unstable'.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Compiling with Debian GNU/Linux 12 (bookworm) packages:

    $ apt-cache madison cargo rustc
         cargo | 0.66.0+ds1-1 | http://deb.debian.org/debian bookworm/main ppc64el Packages
         cargo | 0.66.0+ds1-1 | http://deb.debian.org/debian bookworm/main Sources
         rustc | 1.63.0+dfsg1-2 | http://deb.debian.org/debian bookworm/main ppc64el Packages
         rustc | 1.63.0+dfsg1-2 | http://deb.debian.org/debian bookworm/main Sources

..., we run into:

       Compiling generic_format_parser v0.1.0 ([...]/source-gcc/libgrust/libformat_parser/generic_format_parser)
    error[E0658]: `let...else` statements are unstable
       --&gt; generic_format_parser/src/lib.rs:994:5
        |
    994 | /     let Some(unescaped) = unescape_string(snippet) else {
    995 | |         return InputStringKind::NotALiteral;
    996 | |     };
        | |______^
        |
        = note: see issue #87335 &lt;https://github.com/rust-lang/rust/issues/87335&gt; for more information

Rewrite backwards, per &lt;https://rust-lang.github.io/rfcs/3137-let-else.html&gt;.

	libgrust/
	* libformat_parser/generic_format_parser/src/lib.rs: Work around
	'error[E0658]: `let...else` statements are unstable'.
</pre>
</div>
</content>
</entry>
<entry>
<title>gccrs: format-args: Start storing string in Rust memory</title>
<updated>2024-08-01T11:12:16+00:00</updated>
<author>
<name>Arthur Cohen</name>
<email>arthur.cohen@embecosm.com</email>
</author>
<published>2024-02-22T15:26:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=9b540c4299a6567d0e7642a4664dc76291dc8cbc'/>
<id>9b540c4299a6567d0e7642a4664dc76291dc8cbc</id>
<content type='text'>
gcc/rust/ChangeLog:

	* ast/rust-fmt.cc (ffi::RustHamster::to_string): New.
	(Pieces::collect): Adapt to use new handle API.
	(Pieces::~Pieces): Likewise.
	(Pieces::Pieces): Likewise.
	(Pieces::operator=): Likewise.
	* ast/rust-fmt.h (struct RustString): Add members.
	(struct FormatArgsHandle): New.
	(clone_pieces): Adapt for new FFI API.
	(destroy_pieces): Likewise.
	(struct Pieces): Store new FormatArgsHandle type.
	* expand/rust-expand-format-args.cc (expand_format_args): Use proper
	namespace.
	* resolve/rust-ast-resolve-base.cc (ResolverBase::visit): FormatArgs
	nodes are already resolved, so do nothing.

libgrust/ChangeLog:

	* libformat_parser/src/lib.rs: Use new Handle struct and expose it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gcc/rust/ChangeLog:

	* ast/rust-fmt.cc (ffi::RustHamster::to_string): New.
	(Pieces::collect): Adapt to use new handle API.
	(Pieces::~Pieces): Likewise.
	(Pieces::Pieces): Likewise.
	(Pieces::operator=): Likewise.
	* ast/rust-fmt.h (struct RustString): Add members.
	(struct FormatArgsHandle): New.
	(clone_pieces): Adapt for new FFI API.
	(destroy_pieces): Likewise.
	(struct Pieces): Store new FormatArgsHandle type.
	* expand/rust-expand-format-args.cc (expand_format_args): Use proper
	namespace.
	* resolve/rust-ast-resolve-base.cc (ResolverBase::visit): FormatArgs
	nodes are already resolved, so do nothing.

libgrust/ChangeLog:

	* libformat_parser/src/lib.rs: Use new Handle struct and expose it.
</pre>
</div>
</content>
</entry>
<entry>
<title>gccrs: format-args: Fix Rust interface and add input parsing.</title>
<updated>2024-08-01T11:11:40+00:00</updated>
<author>
<name>Arthur Cohen</name>
<email>arthur.cohen@embecosm.com</email>
</author>
<published>2024-02-16T17:27:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=68cb878c1dab0636da4f686d6c8f5d4fa3b66e3b'/>
<id>68cb878c1dab0636da4f686d6c8f5d4fa3b66e3b</id>
<content type='text'>
gcc/rust/ChangeLog:

	* 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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gcc/rust/ChangeLog:

	* 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.
</pre>
</div>
</content>
</entry>
<entry>
<title>gccrs: format-parser: Add `is_some_and` method for Option&lt;T&gt;</title>
<updated>2024-08-01T11:11:29+00:00</updated>
<author>
<name>Arthur Cohen</name>
<email>arthur.cohen@embecosm.com</email>
</author>
<published>2024-02-26T10:55:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=433fbb156898c256c38a9ee137a51a42fe9177ee'/>
<id>433fbb156898c256c38a9ee137a51a42fe9177ee</id>
<content type='text'>
Workaround for Ubuntu 18.04, since we still use it for the GCC 4.8 CI.
The default Rust package is 1.65 (and unlikely to change I assume?),
but the generic format parser library uses `is_some_and` which was
introduced in 1.70. So this is a simple reimplementation, directly taken
from the standard library sources.

libgrust/ChangeLog:

	* libformat_parser/generic_format_parser/src/lib.rs: Add IsSomeAnd&lt;T&gt;
	trait, impl it for Option&lt;T&gt;.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Workaround for Ubuntu 18.04, since we still use it for the GCC 4.8 CI.
The default Rust package is 1.65 (and unlikely to change I assume?),
but the generic format parser library uses `is_some_and` which was
introduced in 1.70. So this is a simple reimplementation, directly taken
from the standard library sources.

libgrust/ChangeLog:

	* libformat_parser/generic_format_parser/src/lib.rs: Add IsSomeAnd&lt;T&gt;
	trait, impl it for Option&lt;T&gt;.
</pre>
</div>
</content>
</entry>
</feed>
