Rust: libformat_parser: Lower minimum Rust version to 1.49 (was: Rust: Work around 'error[E0658]: `let...else` statements are unstable')

Thomas Schwinge tschwinge@baylibre.com
Mon Dec 9 09:59:56 GMT 2024


Hi!

On 2024-12-05T13:37:13+0100, Arthur Cohen <arthur.cohen@embecosm.com> wrote:
> On 12/4/24 13:35, Thomas Schwinge wrote:
>> On 2024-11-25T11:24:08+0100, Arthur Cohen <arthur.cohen@embecosm.com> wrote:
>>> [...] We had previously done something similar to
>>> adapt to Rust 1.72 when we originally reused the format_args parser:
>>>
>>> https://github.com/Rust-GCC/gccrs/pull/2964

(By the way: I'm confused why I didn't see that one/this existing
GCC/Rust commit, before attempting to fix this myself...  Anyway -- at
least I did a little bit of Rust programming this way.)  ;-)

Anyway:

> In that case, could you instead add the commit mentioned in the PR so we 
> don't need to revert it or change it? But instead we'd just be 
> upstreaming this commit slightly earlier. My thinking is we do the 
> following:
>
> 1. Push commit 039624951f9 upstream, which lowers the required Rust 
> version to 1.49

Pushed to trunk branch commit 67a164eb1da6dba9fb789ae768beebbaa3be37de
"Rust: libformat_parser: Lower minimum Rust version to 1.49", see
attached.

> 2. Send a PR to our github repo with that commit so we merge it in our 
> dev repo as well

That's not actually necessary, I think?  Because:

> 3. This way once we rebase our branch to send it upstream, this commit 
> will just be skipped

This will happen "automatically"?


Grüße
 Thomas


> I think the commit should apply on both our dev repo and our version of 
> gccrs which is upstream.
>
> Feel free to take ownership of it - the changes are extremely similar, 
> the only difference is the use of a trait extension for String::leak() 
> instead of a dedicated leak_string() function.
>
> How do you feel about that? Would that be okay?
>
> Best,
>
> Arthur


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Rust-libformat_parser-Lower-minimum-Rust-version-to-.patch
Type: text/x-diff
Size: 6013 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-rust/attachments/20241209/87bddf24/attachment.bin>


More information about the Gcc-rust mailing list