Hi Arthur! On 2024-11-25T11:24:08+0100, Arthur Cohen <arthur.co...@embecosm.com> wrote: > Thanks, this patch (and your other one on the matter) looks good
Oh, wow -- I passed the first non-trivial Rust programming I've done! :-D ;-) > but I > have a slight issue with it. 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 > > This was later reverted because a GSoC student needed some nightly > features. I would rather re-apply this entire patch, lower our Rust > version requirement to 1.49, and upstream the fixes as part of our next > upstreaming period. What do you think about this? > > There are a couple more fixes to go from 1.72 to 1.49, and the > `String::leak` method is also slightly easier to use. > > Let me know and I'm happy to reapply the PR. Hmm, in terms of incremental progress, to resolve one real issue in my (and others') testing of upstream GCC trunk, would it be OK if I push my two patches now, and then we later extend (or even revert) them as necessary for continued GCC/Rust upstreaming? (..., while keeping the tree buildable with old 'rustc'/'cargo'.) Grüße Thomas > On 11/23/24 9:09 PM, Thomas Schwinge wrote: >> Hi! >> >> On 2024-08-01T16:56:01+0200, Arthur Cohen <arthur.co...@embecosm.com> wrote: >>> Compile libformat_parser and link to it. >> >>> --- /dev/null >>> +++ b/libgrust/libformat_parser/generic_format_parser/src/lib.rs >>> @@ -0,0 +1,1102 @@ >>> +[...] >>> + let Some(unescaped) = unescape_string(snippet) else { >>> + return InputStringKind::NotALiteral; >>> + }; >>> +[...] >> >> OK to push the attached >> "Rust: Work around 'error[E0658]: `let...else` statements are unstable'"? >> Builds and tests fine, but I don't know if this code path is actually >> exercised at this time, so please check carefully; as you know I'm not >> actually a Rust programmer (yet). ;-) >> >> >> Grüße >> Thomas