Hi Thomas!

Thanks, this patch (and your other one on the matter) looks good 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.

Best,

Arthur

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



Attachment: OpenPGP_0x1B3465B044AD9C65.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to