git: 75cbd67d7179 - main - net/rosenpass: Fix build with rust 1.78.0

From: Mikael Urankar <mikael_at_FreeBSD.org>
Date: Mon, 13 May 2024 11:03:53 UTC
The branch main has been updated by mikael:

URL: https://cgit.FreeBSD.org/ports/commit/?id=75cbd67d71793ebe3755a834af22afa244552d76

commit 75cbd67d71793ebe3755a834af22afa244552d76
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2024-05-07 10:51:48 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2024-05-13 11:03:21 +0000

    net/rosenpass: Fix build with rust 1.78.0
    
    PR:             278834
    Approved by:    portmgr (build fix blanket)
---
 net/rosenpass/files/patch-rust-1.78.0 | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/net/rosenpass/files/patch-rust-1.78.0 b/net/rosenpass/files/patch-rust-1.78.0
new file mode 100644
index 000000000000..efdfe6ac90b7
--- /dev/null
+++ b/net/rosenpass/files/patch-rust-1.78.0
@@ -0,0 +1,32 @@
+Comment the "#[doc = !($field)]" line
+Upstream has changed this code a lot and this line is not present anymore.
+
+error: attribute value must be a literal
+   --> rosenpass/src/msgs.rs:135:21
+    |
+135 |               #[doc = !($field)]
+    |                       ^^^^^^^^^
+...
+258 | / data_lense! { Envelope<M> :=
+259 | |     /// [MsgType] of this message
+260 | |     msg_type: 1,
+261 | |     /// Reserved for future use
+...   |
+269 | |     cookie: sodium::MAC_SIZE
+270 | | }
+    | |_- in this macro invocation
+    | 
+    = note: this error originates in the macro `data_lense` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+
+--- rosenpass/src/msgs.rs.orig	2024-05-07 11:12:55 UTC
++++ rosenpass/src/msgs.rs
+@@ -132,7 +132,7 @@ macro_rules! data_lense(
+         impl<__ContainerType $(, $( $generic: LenseView ),+ )? > $type<__ContainerType $(, $( $generic ),+ )? >{
+             $(
+             /// Size in bytes of the field `
+-            #[doc = !($field)]
++            //#[doc = !($field)]
+             /// `
+             pub const fn [< $field _len >]() -> usize{
+                 $len