git: d6a24d4f9c7f - main - net-p2p/openethereum: Unbreak with Rust 1.53.0
Tobias Kortkamp
tobik at FreeBSD.org
Sun Jun 20 09:30:43 UTC 2021
The branch main has been updated by tobik:
URL: https://cgit.FreeBSD.org/ports/commit/?id=d6a24d4f9c7f620336e35324eab5bce776cf14e7
commit d6a24d4f9c7f620336e35324eab5bce776cf14e7
Author: Tobias Kortkamp <tobik at FreeBSD.org>
AuthorDate: 2021-06-19 19:34:01 +0000
Commit: Tobias Kortkamp <tobik at FreeBSD.org>
CommitDate: 2021-06-20 09:26:08 +0000
net-p2p/openethereum: Unbreak with Rust 1.53.0
error[E0061]: this function takes 1 argument but 2 arguments were supplied
--> cargo-crates/logos-derive-0.7.7/src/lib.rs:55:20
|
55 | extras.insert(util::ident(&ext), |_| panic!("Only one #[extras] attribute can be declared."));
| ^^^^^^ ----------------- ----------------------------------------------------------- supplied 2 arguments
| |
| expected 1 argument
|
http://package23.nyi.freebsd.org/data/114i386-default-foo/2021-06-18_08h49m22s/logs/errors/openethereum-3.2.6.log
PR: 256653
---
...atch-cargo-crates_logos-derive-0.7.7_src_lib.rs | 34 ++++++++++++++++++++++
...tch-cargo-crates_logos-derive-0.7.7_src_util.rs | 16 ++++++++++
2 files changed, 50 insertions(+)
diff --git a/net-p2p/openethereum/files/patch-cargo-crates_logos-derive-0.7.7_src_lib.rs b/net-p2p/openethereum/files/patch-cargo-crates_logos-derive-0.7.7_src_lib.rs
new file mode 100644
index 000000000000..e522c239ff92
--- /dev/null
+++ b/net-p2p/openethereum/files/patch-cargo-crates_logos-derive-0.7.7_src_lib.rs
@@ -0,0 +1,34 @@
+error[E0061]: this function takes 1 argument but 2 arguments were supplied
+ --> cargo-crates/logos-derive-0.7.7/src/lib.rs:55:20
+ |
+55 | extras.insert(util::ident(&ext), |_| panic!("Only one #[extras] attribute can be declared."));
+ | ^^^^^^ ----------------- ----------------------------------------------------------- supplied 2 arguments
+ | |
+ | expected 1 argument
+ |
+
+--- cargo-crates/logos-derive-0.7.7/src/lib.rs.orig 2021-06-19 19:31:53 UTC
++++ cargo-crates/logos-derive-0.7.7/src/lib.rs
+@@ -52,7 +52,7 @@ pub fn logos(input: TokenStream) -> TokenStream {
+
+ for attr in &item.attrs {
+ if let Some(ext) = value_from_attr("extras", attr) {
+- extras.insert(util::ident(&ext), |_| panic!("Only one #[extras] attribute can be declared."));
++ extras.insert_or(util::ident(&ext), |_| panic!("Only one #[extras] attribute can be declared."));
+ }
+ }
+
+@@ -86,11 +86,11 @@ pub fn logos(input: TokenStream) -> TokenStream {
+ let variant = &variant.ident;
+
+ if ident == "error" {
+- error.insert(variant, |_| panic!("Only one #[error] variant can be declared."));
++ error.insert_or(variant, |_| panic!("Only one #[error] variant can be declared."));
+ }
+
+ if ident == "end" {
+- end.insert(variant, |_| panic!("Only one #[end] variant can be declared."));
++ end.insert_or(variant, |_| panic!("Only one #[end] variant can be declared."));
+ }
+
+ if let Some(path) = value_from_attr("token", attr) {
diff --git a/net-p2p/openethereum/files/patch-cargo-crates_logos-derive-0.7.7_src_util.rs b/net-p2p/openethereum/files/patch-cargo-crates_logos-derive-0.7.7_src_util.rs
new file mode 100644
index 000000000000..b39df6a643c5
--- /dev/null
+++ b/net-p2p/openethereum/files/patch-cargo-crates_logos-derive-0.7.7_src_util.rs
@@ -0,0 +1,16 @@
+--- cargo-crates/logos-derive-0.7.7/src/util.rs.orig 2021-06-19 20:26:00 UTC
++++ cargo-crates/logos-derive-0.7.7/src/util.rs
+@@ -3,11 +3,11 @@ pub use proc_macro2::{Span, TokenTree};
+ use quote::quote;
+
+ pub trait OptionExt<T> {
+- fn insert(&mut self, val: T, f: impl FnOnce(&T));
++ fn insert_or(&mut self, val: T, f: impl FnOnce(&T));
+ }
+
+ impl<T> OptionExt<T> for Option<T> {
+- fn insert(&mut self, val: T, f: impl FnOnce(&T)) {
++ fn insert_or(&mut self, val: T, f: impl FnOnce(&T)) {
+ match self {
+ Some(t) => f(t),
+ slot => *slot = Some(val),
More information about the dev-commits-ports-all
mailing list