Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incomprehensible type error when defining getter and setter #78337

Open
MarinPostma opened this issue Oct 24, 2020 · 5 comments
Open

Incomprehensible type error when defining getter and setter #78337

MarinPostma opened this issue Oct 24, 2020 · 5 comments
Labels
A-async-await Area: Async & Await A-diagnostics Area: Messages for errors, warnings, and lints A-typesystem Area: The type system AsyncAwait-Triaged Async-await issues that have been triaged during a working group meeting. C-enhancement Category: An issue proposing an enhancement or a PR with one. D-confusing Confusing diagnostic error that should be reworked D-verbose Too much output caused by a single piece of incorrect code E-needs-mcve Call for participation: This issue needs a Minimal Complete and Verifiable Example T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@MarinPostma
Copy link

MarinPostma commented Oct 24, 2020

I was trying to create getter and setter for a particular field in a struct, and doing so generated a type error. Before adding the methods, the code compiled just fine, but adding them produce a type error. I'm joining the diff of the code that produced the error along with the error message. Unless I am missing something the two version ought to be strictly equivalent. This is the minimal code sample that produce the error.

Code changes

diff --git a/async-raft/src/core/append_entries.rs b/async-raft/src/core/append_entries.rs
index 28b3b1d..b82a224 100644
--- a/async-raft/src/core/append_entries.rs
+++ b/async-raft/src/core/append_entries.rs
@@ -201,16 +201,16 @@ impl<D: AppData, R: AppDataResponse, N: RaftNetwork<D>, S: RaftStorage<D, R>> Ra
     /// Replicate outstanding logs to the state machine if needed.
     #[tracing::instrument(level = "trace", skip(self, report_metrics))]
     async fn replicate_to_state_machine_if_needed(&mut self, report_metrics: &mut bool) -> RaftResult<()> {
-        if self.commit_index > self.last_applied {
+        if self.commit_index > self.last_applied() {
             // Fetch the series of entries which must be applied to the state machine, and apply them.
             let stop = std::cmp::min(self.commit_index, self.last_log_index) + 1;
             let entries = self
                 .storage
-                .get_log_entries(self.last_applied + 1, stop)
+                .get_log_entries(self.last_applied() + 1, stop)
                 .await
                 .map_err(|err| self.map_fatal_storage_error(err))?;
             if let Some(entry) = entries.last() {
-                self.last_applied = entry.index;
+                self.set_last_applied( entry.index );
                 *report_metrics = true;
             }
             let data_entries: Vec<_> = entries
diff --git a/async-raft/src/core/client.rs b/async-raft/src/core/client.rs
index d11a7a8..8fac0d0 100644
--- a/async-raft/src/core/client.rs
+++ b/async-raft/src/core/client.rs
@@ -295,7 +295,7 @@ impl<'a, D: AppData, R: AppDataResponse, N: RaftNetwork<D>, S: RaftStorage<D, R>
                 }
             },
             ClientOrInternalResponseTx::Internal(tx) => {
-                self.core.last_applied = req.entry.index;
+                self.core.set_last_applied(req.entry.index);
                 self.core.report_metrics();
                 let _ = tx.send(Ok(req.entry.index));
             }
@@ -313,7 +313,7 @@ impl<'a, D: AppData, R: AppDataResponse, N: RaftNetwork<D>, S: RaftStorage<D, R>
         // entry to the state machine.
         //
         // Note that this would only ever happen if a node had unapplied logs from before becoming leader.
-        let expected_next_index = self.core.last_applied + 1;
+        let expected_next_index = self.core.last_applied() + 1;
         if index != &expected_next_index {
             let entries = self
                 .core
@@ -322,7 +322,7 @@ impl<'a, D: AppData, R: AppDataResponse, N: RaftNetwork<D>, S: RaftStorage<D, R>
                 .await
                 .map_err(|err| self.core.map_fatal_storage_error(err))?;
             if let Some(entry) = entries.last() {
-                self.core.last_applied = entry.index;
+                self.core.set_last_applied(entry.index);
             }
             let data_entries: Vec<_> = entries
                 .iter()
@@ -347,7 +347,7 @@ impl<'a, D: AppData, R: AppDataResponse, N: RaftNetwork<D>, S: RaftStorage<D, R>
             .apply_entry_to_state_machine(index, entry)
             .await
             .map_err(|err| self.core.map_fatal_storage_error(err))?;
-        self.core.last_applied = *index;
+        self.core.set_last_applied(*index);
         self.core.report_metrics();
         Ok(res)
     }
diff --git a/async-raft/src/core/install_snapshot.rs b/async-raft/src/core/install_snapshot.rs
index c7a19dc..65ad7c5 100644
--- a/async-raft/src/core/install_snapshot.rs
+++ b/async-raft/src/core/install_snapshot.rs
@@ -134,7 +134,7 @@ impl<D: AppData, R: AppDataResponse, N: RaftNetwork<D>, S: RaftStorage<D, R>> Ra
         self.update_membership(membership)?;
         self.last_log_index = req.last_included_index;
         self.last_log_term = req.last_included_term;
-        self.last_applied = req.last_included_index;
+        self.set_last_applied(req.last_included_index);
         self.snapshot_index = req.last_included_index;
         Ok(())
     }
diff --git a/async-raft/src/core/mod.rs b/async-raft/src/core/mod.rs
index 589965e..79abb40 100644
--- a/async-raft/src/core/mod.rs
+++ b/async-raft/src/core/mod.rs
@@ -146,7 +146,7 @@ impl<D: AppData, R: AppDataResponse, N: RaftNetwork<D>, S: RaftStorage<D, R>> Ra
         self.current_term = state.hard_state.current_term;
         self.voted_for = state.hard_state.voted_for;
         self.membership = state.membership;
-        self.last_applied = state.last_applied_log;
+        self.set_last_applied(state.last_applied_log);
         // NOTE: this is repeated here for clarity. It is unsafe to initialize the node's commit
         // index to any other value. The commit index must be determined by a leader after
         // successfully committing a new log to the cluster.
@@ -193,6 +193,14 @@ impl<D: AppData, R: AppDataResponse, N: RaftNetwork<D>, S: RaftStorage<D, R>> Ra
         }
     }
 
+    fn last_applied(&self) -> u64 {
+        self.last_applied
+    }
+
+    fn set_last_applied(&mut self, val: u64) {
+        self.last_applied = val;
+    }
+
     /// Report a metrics payload on the current state of the Raft node.
     #[tracing::instrument(level = "trace", skip(self))]
     fn report_metrics(&mut self) {
@@ -201,7 +209,7 @@ impl<D: AppData, R: AppDataResponse, N: RaftNetwork<D>, S: RaftStorage<D, R>> Ra
             state: self.target_state,
             current_term: self.current_term,
             last_log_index: self.last_log_index,
-            last_applied: self.last_applied,
+            last_applied: self.last_applied(),
             current_leader: self.current_leader,
             membership_config: self.membership.clone(),
         });

Meta

rustc --version --verbose:

rustc 1.46.0-nightly (feb3536eb 2020-06-09)
binary: rustc
commit-hash: feb3536eba10c2e4585d066629598f03d5ddc7c6
commit-date: 2020-06-09
host: x86_64-unknown-linux-gnu
release: 1.46.0-nightly
LLVM version: 10.0
Error output

    Checking     Checking async-raft v0.5.1 (/home/mpostma/Documents/code/rust/async-raft/async-raft)
async-raft v0.5.1 (/home/mpostma/Documents/code/rust/async-raft/async-raft)
error[E0277]: `<S as storage::RaftStorage<D, R>>::Snapshot` cannot be shared between threads safely
   --> async-raft/src/core/mod.rs:136:9
    |
136 |         tokio::spawn(this.main())
    |         ^^^^^^^^^^^^ `<S as storage::RaftStorage<D, R>>::Snapshot` cannot be shared between threads safely
    | 
   ::: /home/mpostma/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.22/src/task/spawn.rs:127:21
    |
127 |         T: Future + Send + 'static,
    |                     ---- required by this bound in `tokio::task::spawn::spawn`
    |
    = help: the trait `std::marker::Sync` is not implemented for `<S as storage::RaftStorage<D, R>>::Snapshot`
    = note: required because of the requirements on the impl of `std::marker::Sync` for `std::ptr::Unique<<S as storage::RaftStorage<D, R>>::Snapshot>`
    = note: required because it appears within the type `std::boxed::Box<<S as storage::RaftStorage<D, R>>::Snapshot>`
    = note: required because it appears within the type `core::SnapshotState<<S as storage::RaftStorage<D, R>>::Snapshot>`
    = note: required because it appears within the type `std::option::Option<core::SnapshotState<<S as storage::RaftStorage<D, R>>::Snapshot>>`
    = note: required because it appears within the type `core::RaftCore<D, R, N, S>`
    = note: required because of the requirements on the impl of `std::marker::Send` for `&core::RaftCore<D, R, N, S>`
    = note: required because it appears within the type `for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10> {std::future::ResumeTy, bool, u64, core::RaftCore<D, R, N, S>, &'r mut core::RaftCore<D, R, N, S>, &'s S, std::sync::Arc<S>, &'t0 core::RaftCore<D, R, N, S>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::vec::Vec<raft::Entry<D>>, anyhow::Error>> + std::marker::Send + 't1)>>, (), std::vec::Vec<raft::Entry<D>>, std::vec::Vec<(&'t2 u64, &'t3 D)>, &'t4 [(&'t5 u64, &'t6 D)], &'t7 std::vec::Vec<(&'t8 u64, &'t9 D)>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<(), anyhow::Error>> + std::marker::Send + 't10)>>}`
    = note: required because it appears within the type `[static generator@async-raft/src/core/append_entries.rs:203:107: 235:6 self:&mut core::RaftCore<D, R, N, S>, report_metrics:&mut bool for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10> {std::future::ResumeTy, bool, u64, core::RaftCore<D, R, N, S>, &'r mut core::RaftCore<D, R, N, S>, &'s S, std::sync::Arc<S>, &'t0 core::RaftCore<D, R, N, S>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::vec::Vec<raft::Entry<D>>, anyhow::Error>> + std::marker::Send + 't1)>>, (), std::vec::Vec<raft::Entry<D>>, std::vec::Vec<(&'t2 u64, &'t3 D)>, &'t4 [(&'t5 u64, &'t6 D)], &'t7 std::vec::Vec<(&'t8 u64, &'t9 D)>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<(), anyhow::Error>> + std::marker::Send + 't10)>>}]`
    = note: required because it appears within the type `for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5> {std::future::ResumeTy, &'r mut core::RaftCore<D, R, N, S>, &'s mut bool, tracing::span::Span, [static generator@async-raft/src/core/append_entries.rs:203:107: 235:6 self:&'t0 mut core::RaftCore<D, R, N, S>, report_metrics:&'t1 mut bool for<'t6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15, 't16, 't17, 't18> {std::future::ResumeTy, bool, u64, core::RaftCore<D, R, N, S>, &'t6 mut core::RaftCore<D, R, N, S>, &'t7 S, std::sync::Arc<S>, &'t8 core::RaftCore<D, R, N, S>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::vec::Vec<raft::Entry<D>>, anyhow::Error>> + std::marker::Send + 't9)>>, (), std::vec::Vec<raft::Entry<D>>, std::vec::Vec<(&'t10 u64, &'t11 D)>, &'t12 [(&'t13 u64, &'t14 D)], &'t15 std::vec::Vec<(&'t16 u64, &'t17 D)>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<(), anyhow::Error>> + std::marker::Send + 't18)>>}], impl core::future::future::Future, tracing_futurerror[E0277]: `<S as storage::RaftStorage<D, R>>::Snapshot` cannot be shared between threads safely
   --> async-raft/src/core/mod.rs:136:9
    |
136 |         tokio::spawn(this.main())
    |         ^^^^^^^^^^^^ `<S as storage::RaftStorage<D, R>>::Snapshot` cannot be shared between threads safely
    | 
   ::: /home/mpostma/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.22/src/task/spawn.rs:127:21
    |
127 |         T: Future + Send + 'static,
    |                     ---- required by this bound in `tokio::task::spawn::spawn`
    |
    = help: the trait `std::marker::Sync` is not implemented for `<S as storage::RaftStorage<D, R>>::Snapshot`
    = note: required because of the requirements on the impl of `std::marker::Sync` for `std::ptr::Unique<<S as storage::RaftStorage<D, R>>::Snapshot>`
    = note: required because it appears within the type `std::boxed::Box<<S as storage::RaftStorage<D, R>>::Snapshot>`
    = note: required because it appears within the type `core::SnapshotState<<S as storage::RaftStorage<D, R>>::Snapshot>`
    = note: required because it appears within the type `std::option::Option<core::SnapshotState<<S as storage::RaftStorage<D, R>>::Snapshot>>`
    = note: required because it appears within the type `core::RaftCore<D, R, N, S>`
    = note: required because of the requirements on the impl of `std::marker::Send` for `&core::RaftCore<D, R, N, S>`
    = note: required because it appears within the type `for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10> {std::future::ResumeTy, bool, u64, core::RaftCore<D, R, N, S>, &'r mut core::RaftCore<D, R, N, S>, &'s S, std::sync::Arc<S>, &'t0 core::RaftCore<D, R, N, S>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::vec::Vec<raft::Entry<D>>, anyhow::Error>> + std::marker::Send + 't1)>>, (), std::vec::Vec<raft::Entry<D>>, std::vec::Vec<(&'t2 u64, &'t3 D)>, &'t4 [(&'t5 u64, &'t6 D)], &'t7 std::vec::Vec<(&'t8 u64, &'t9 D)>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<(), anyhow::Error>> + std::marker::Send + 't10)>>}`
    = note: required because it appears within the type `[static generator@async-raft/src/core/append_entries.rs:203:107: 235:6 self:&mut core::RaftCore<D, R, N, S>, report_metrics:&mut bool for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10> {std::future::ResumeTy, bool, u64, core::RaftCore<D, R, N, S>, &'r mut core::RaftCore<D, R, N, S>, &'s S, std::sync::Arc<S>, &'t0 core::RaftCore<D, R, N, S>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::vec::Vec<raft::Entry<D>>, anyhow::Error>> + std::marker::Send + 't1)>>, (), std::vec::Vec<raft::Entry<D>>, std::vec::Vec<(&'t2 u64, &'t3 D)>, &'t4 [(&'t5 u64, &'t6 D)], &'t7 std::vec::Vec<(&'t8 u64, &'t9 D)>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<(), anyhow::Error>> + std::marker::Send + 't10)>>}]`
    = note: required because it appears within the type `for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5> {std::future::ResumeTy, &'r mut core::RaftCore<D, R, N, S>, &'s mut bool, tracing::span::Span, [static generator@async-raft/src/core/append_entries.rs:203:107: 235:6 self:&'t0 mut core::RaftCore<D, R, N, S>, report_metrics:&'t1 mut bool for<'t6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15, 't16, 't17, 't18> {std::future::ResumeTy, bool, u64, core::RaftCore<D, R, N, S>, &'t6 mut core::RaftCore<D, R, N, S>, &'t7 S, std::sync::Arc<S>, &'t8 core::RaftCore<D, R, N, S>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::vec::Vec<raft::Entry<D>>, anyhow::Error>> + std::marker::Send + 't9)>>, (), std::vec::Vec<raft::Entry<D>>, std::vec::Vec<(&'t10 u64, &'t11 D)>, &'t12 [(&'t13 u64, &'t14 D)], &'t15 std::vec::Vec<(&'t16 u64, &'t17 D)>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<(), anyhow::Error>> + std::marker::Send + 't18)>>}], impl core::future::future::Future, tracing_futures::Instrumented<impl core::future::future::Future>, ()}`
    = note: required because it appears within the type `[static generator@async-raft/src/core/append_entries.rs:202:5: 202:72 self:&mut core::RaftCore<D, R, N, S>, report_metrics:&mut bool for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5> {std::future::ResumeTy, &'r mut core::RaftCore<D, R, N, S>, &'s mut bool, tracing::span::Span, [static generator@async-raft/src/core/append_entries.rs:203:107: 235:6 self:&'t0 mut core::RaftCore<D, R, N, S>, report_metrics:&'t1 mut bool for<'t6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15, 't16, 't17, 't18> {std::future::ResumeTy, bool, u64, core::RaftCore<D, R, N, S>, &'t6 mut core::RaftCore<D, R, N, S>, &'t7 S, std::sync::Arc<S>, &'t8 core::RaftCore<D, R, N, S>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::vec::Vec<raft::Entry<D>>, anyhow::Error>> + std::marker::Send + 't9)>>, (), std::vec::Vec<raft::Entry<D>>, std::vec::Vec<(&'t10 u64, &'t11 D)>, &'t12 [(&'t13 u64, &'t14 D)], &'t15 std::vec::Vec<(&'t16 u64, &'t17 D)>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<(), anyhow::Error>> + std::marker::Send + 't18)>>}], impl core::future::future::Future, tracing_futures::Instrumented<impl core::future::future::Future>, ()}]`
    = note: required because it appears within the type `std::future::from_generator::GenFuture<[static generator@async-raft/src/core/append_entries.rs:202:5: 202:72 self:&mut core::RaftCore<D, R, N, S>, report_metrics:&mut bool for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5> {std::future::ResumeTy, &'r mut core::RaftCore<D, R, N, S>, &'s mut bool, tracing::span::Span, [static generator@async-raft/src/core/append_entries.rs:203:107: 235:6 self:&'t0 mut core::RaftCore<D, R, N, S>, report_metrics:&'t1 mut bool for<'t6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15, 't16, 't17, 't18> {std::future::ResumeTy, bool, u64, core::RaftCore<D, R, N, S>, &'t6 mut core::RaftCore<D, R, N, S>, &'t7 S, std::sync::Arc<S>, &'t8 core::RaftCore<D, R, N, S>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::vec::Vec<raft::Entry<D>>, anyhow::Error>> + std::marker::Send + 't9)>>, (), std::vec::Vec<raft::Entry<D>>, std::vec::Vec<(&'t10 u64, &'t11 D)>, &'t12 [(&'t13 u64, &'t14 D)], &'t15 std::vec::Vec<(&'t16 u64, &'t17 D)>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<(), anyhow::Error>> + std::marker::Send + 't18)>>}], impl core::future::future::Future, tracing_futures::Instrumented<impl core::future::future::Future>, ()}]>`
    = note: required because it appears within the type `impl core::future::future::Future`
    = note: required because it appears within the type `impl core::future::future::Future`
    = note: required because it appears within the type `for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11> {std::future::ResumeTy, bool, &'r mut core::RaftCore<D, R, N, S>, impl core::future::future::Future, (), &'t0 mut bool, impl core::future::future::Future, raft::AppendEntriesRequest<D>, std::vec::Vec<raft::Entry<D>>, &'t3 [raft::Entry<D>], &'t4 std::vec::Vec<raft::Entry<D>>, impl core::future::future::Future, core::RaftCore<D, R, N, S>, &'t7 S, std::sync::Arc<S>, u64, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::vec::Vec<raft::Entry<D>>, anyhow::Error>> + std::marker::Send + 't8)>>, &'t9 raft::Entry<D>, raft::Entry<D>, std::option::Option<u64>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<(), anyhow::Error>> + std::marker::Send + 't10)>>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<raft::MembershipConfig, anyhow::Error>> + std::marker::Send + 't11)>>}`
    = note: required because it appears within the type `[static generator@async-raft/src/core/append_entries.rs:14:133: 168:6 msg:raft::AppendEntriesRequest<D>, self:&mut core::RaftCore<D, R, N, S> for<'r, 's, 't0, es::Instrumented<impl core::future::future::Future>, ()}`
    = note: required because it appears within the type `[static generator@async-raft/src/core/append_entries.rs:202:5: 202:72 self:&mut core::RaftCore<D, R, N, S>, report_metrics:&mut bool for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5> {std::future::ResumeTy, &'r mut core::RaftCore<D, R, N, S>, &'s mut bool, tracing::span::Span, [static generator@async-raft/src/core/append_entries.rs:203:107: 235:6 self:&'t0 mut core::RaftCore<D, R, N, S>, report_metrics:&'t1 mut bool for<'t6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15, 't16, 't17, 't18> {std::future::ResumeTy, bool, u64, core::RaftCore<D, R, N, S>, &'t6 mut core::RaftCore<D, R, N, S>, &'t7 S, std::sync::Arc<S>, &'t8 core::RaftCore<D, R, N, S>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::vec::Vec<raft::Entry<D>>, anyhow::Error>> + std::marker::Send + 't9)>>, (), std::vec::Vec<raft::Entry<D>>, std::vec::Vec<(&'t10 u64, &'t11 D)>, &'t12 [(&'t13 u64, &'t14 D)], &'t15 std::vec::Vec<(&'t16 u64, &'t17 D)>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<(), anyhow::Error>> + std::marker::Send + 't18)>>}], impl core::future::future::Future, tracing_futures::Instrumented<impl core::future::future::Future>, ()}]`
    = note: required because it appears within the type `std::future::from_generator::GenFuture<[static generator@async-raft/src/core/append_entries.rs:202:5: 202:72 self:&mut core::RaftCore<D, R, N, S>, report_metrics:&mut bool for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5> {std::future::ResumeTy, &'r mut core::RaftCore<D, R, N, S>, &'s mut bool, tracing::span::Span, [static generator@async-raft/src/core/append_entries.rs:203:107: 235:6 self:&'t0 mut core::RaftCore<D, R, N, S>, report_metrics:&'t1 mut bool for<'t6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15, 't16, 't17, 't18> {std::future::ResumeTy, bool, u64, core::RaftCore<D, R, N, S>, &'t6 mut core::RaftCore<D, R, N, S>, &'t7 S, std::sync::Arc<S>, &'t8 core::RaftCore<D, R, N, S>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::vec::Vec<raft::Entry<D>>, anyhow::Error>> + std::marker::Send + 't9)>>, (), std::vec::Vec<raft::Entry<D>>, std::vec::Vec<(&'t10 u64, &'t11 D)>, &'t12 [(&'t13 u64, &'t14 D)], &'t15 std::vec::Vec<(&'t16 u64, &'t17 D)>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<(), anyhow::Error>> + std::marker::Send + 't18)>>}], impl core::future::future::Future, tracing_futures::Instrumented<impl core::future::future::Future>, ()}]>`
    = note: required because it appears within the type `impl core::future::future::Future`
    = note: required because it appears within the type `impl core::future::future::Future`
    = note: required because it appears within the type `for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11> {std::future::ResumeTy, bool, &'r mut core::RaftCore<D, R, N, S>, impl core::future::future::Future, (), &'t0 mut bool, impl core::future::future::Future, raft::AppendEntriesRequest<D>, std::vec::Vec<raft::Entry<D>>, &'t3 [raft::Entry<D>], &'t4 std::vec::Vec<raft::Entry<D>>, impl core::future::future::Future, core::RaftCore<D, R, N, S>, &'t7 S, std::sync::Arc<S>, u64, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::vec::Vec<raft::Entry<D>>, anyhow::Error>> + std::marker::Send + 't8)>>, &'t9 raft::Entry<D>, raft::Entry<D>, std::option::Option<u64>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<(), anyhow::Error>> + std::marker::Send + 't10)>>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<raft::MembershipConfig, anyhow::Error>> + std::marker::Send + 't11)>>}`
    = note: required because it appears within the type `[static generator@async-raft/src/core/append_entries.rs:14:133: 168:6 msg:raft::AppendEntriesRequest<D>, self:&mut core::RaftCore<D, R, N, S> for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11> {std::future::ResumeTy, bool, &'r mut core::RaftCore<D, R, N, S>, impl core::future::future::Future, (), &'t0 mut bool, impl core::future::future::Future, raft::AppendEntriesRequest<D>, std::vec::Vec<raft::Entry<D>>, &'t3 [raft::Entry<D>], &'t4 std::vec::Vec<raft::Entry<D>>, impl core::future::future::Future, core::RaftCore<D, R, N, S>, &'t7 S, std::sync::Arc<S>, u64, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::vec::Vec<raft::Entry<D>>, anyhow::Error>> + std::marker::Send + 't8)>>, &'t9 raft::Entry<D>, raft::Entry<D>, std::option::Option<u64>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<(), anyhow::Error>> + std::marker::Send + 't10)>>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<raft::MembershipConfig, anyhow::Error>> + std::marker::Send + 't11)>>}]`
    = note: required because it appears within the type `for<'r, 's, 't0, 't1> {std::future::ResumeTy, &'r mut core::RaftCore<D, R, N, S>, raft::AppendEntriesRequest<D>, tracing::span::Span, [static generator@async-raft/src/core/append_entries.rs:14:133: 168:6 msg:raft::AppendEntriesRequest<D>, self:&'s mut core::RaftCore<D, R, N, S> for<'t2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15> {std::future::ResumeTy, bool, &'t2 mut core::RaftCore<D, R, N, S>, impl core::future::future::Future, (), &'t4 mut bool, impl core::future::future::Future, raft::AppendEntriesRequest<D>, std::vec::Vec<raft::Entry<D>>, &'t7 [raft::Entry<D>], &'t8 std::vec::Vec<raft::Entry<D>>, impl core::future::future::Future, core::RaftCore<D, R, N, S>, &'t11 S, std::sync::Arc<S>, u64, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::vec::Vec<raft::Entry<D>>, anyhow::Error>> + std::marker::Send + 't12)>>, &'t13 raft::Entry<D>, raft::Entry<D>, std::option::Option<u64>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<(), anyhow::Error>> + std::marker::Send + 't14)>>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<raft::MembershipConfig, anyhow::Error>> + std::marker::Send + 't15)>>}], impl core::future::future::Future, tracing_futures::Instrumented<impl core::future::future::Future>, ()}`
    = note: required because it appears within the type `[static generator@async-raft/src/core/append_entries.rs:10:5: 13:7 self:&mut core::RaftCore<D, R, N, S>, msg:raft::AppendEntriesRequest<D> for<'r, 's, 't0, 't1> {std::future::ResumeTy, &'r mut core::RaftCore<D, R, N, S>, raft::AppendEntriesRequest<D>, tracing::span::Span, [static generator@async-raft/src/core/append_entries.rs:14:133: 168:6 msg:raft::AppendEntriesRequest<D>, self:&'s mut core::RaftCore<D, R, N, S> for<'t2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15> {std::future::ResumeTy, bool, &'t2 mut core::RaftCore<D, R, N, S>, impl core::future::future::Future, (), &'t4 mut bool, impl core::future::future::Future, raft::AppendEntriesRequest<D>, std::vec::Vec<raft::Entry<D>>, &'t7 [raft::Entry<D>], &'t8 std::vec::Vec<raft::Entry<D>>, impl core::future::future::Future, core::RaftCore<D, R, N, S>, &'t11 S, std::sync::Arc<S>, u64, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::vec::Vec<raft::Entry<D>>, anyhow::Error>> + std::marker::Send + 't12)>>, &'t13 raft::Entry<D>, raft::Entry<D>, std::option::Option<u64>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<(), anyhow::Error>> + std::marker::Send + 't14)>>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<raft::MembershipConfig, anyhow::Error>> + std::marker::Send + 't15)>>}], impl core::future::future::Future, tracing_futures::Instrumented<impl core::future::future::Future>, ()}]`
    = note: required because it appears within the type `std::future::from_generator::GenFuture<[stat't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11> {std::future::ResumeTy, bool, &'r mut core::RaftCore<D, R, N, S>, impl core::future::future::Future, (), &'t0 mut bool, impl core::future::future::Future, raft::AppendEntriesRequest<D>, std::vec::Vec<raft::Entry<D>>, &'t3 [raft::Entry<D>], &'t4 std::vec::Vec<raft::Entry<D>>, impl core::future::future::Future, core::RaftCore<D, R, N, S>, &'t7 S, std::sync::Arc<S>, u64, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::vec::Vec<raft::Entry<D>>, anyhow::Error>> + std::marker::Send + 't8)>>, &'t9 raft::Entry<D>, raft::Entry<D>, std::option::Option<u64>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<(), anyhow::Error>> + std::marker::Send + 't10)>>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<raft::MembershipConfig, anyhow::Error>> + std::marker::Send + 't11)>>}]`
    = note: required because it appears within the type `for<'r, 's, 't0, 't1> {std::future::ResumeTy, &'r mut core::RaftCore<D, R, N, S>, raft::AppendEntriesRequest<D>, tracing::span::Span, [static generator@async-raft/src/core/append_entries.rs:14:133: 168:6 msg:raft::AppendEntriesRequest<D>, self:&'s mut core::RaftCore<D, R, N, S> for<'t2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15> {std::future::ResumeTy, bool, &'t2 mut core::RaftCore<D, R, N, S>, impl core::future::future::Future, (), &'t4 mut bool, impl core::future::future::Future, raft::AppendEntriesRequest<D>, std::vec::Vec<raft::Entry<D>>, &'t7 [raft::Entry<D>], &'t8 std::vec::Vec<raft::Entry<D>>, impl core::future::future::Future, core::RaftCore<D, R, N, S>, &'t11 S, std::sync::Arc<S>, u64, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::vec::Vec<raft::Entry<D>>, anyhow::Error>> + std::marker::Send + 't12)>>, &'t13 raft::Entry<D>, raft::Entry<D>, std::option::Option<u64>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<(), anyhow::Error>> + std::marker::Send + 't14)>>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<raft::MembershipConfig, anyhow::Error>> + std::marker::Send + 't15)>>}], impl core::future::future::Future, tracing_futures::Instrumented<impl core::future::future::Future>, ()}`
    = note: required because it appears within the type `[static generator@async-raft/src/core/append_entries.rs:10:5: 13:7 self:&mut core::RaftCore<D, R, N, S>, msg:raft::AppendEntriesRequest<D> for<'r, 's, 't0, 't1> {std::future::ResumeTy, &'r mut core::RaftCore<D, R, N, S>, raft::AppendEntriesRequest<D>, tracing::span::Span, [static generator@async-raft/src/core/append_entries.rs:14:133: 168:6 msg:raft::AppendEntriesRequest<D>, self:&'s mut core::RaftCore<D, R, N, S> for<'t2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15> {std::future::ResumeTy, bool, &'t2 mut core::RaftCore<D, R, N, S>, impl core::future::future::Future, (), &'t4 mut bool, impl core::future::future::Future, raft::AppendEntriesRequest<D>, std::vec::Vec<raft::Entry<D>>, &'t7 [raft::Entry<D>], &'t8 std::vec::Vec<raft::Entry<D>>, impl core::future::future::Future, core::RaftCore<D, R, N, S>, &'t11 S, std::sync::Arc<S>, u64, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::vec::Vec<raft::Entry<D>>, anyhow::Error>> + std::marker::Send + 't12)>>, &'t13 raft::Entry<D>, raft::Entry<D>, std::option::Option<u64>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<(), anyhow::Error>> + std::marker::Send + 't14)>>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<raft::MembershipConfig, anyhow::Error>> + std::marker::Send + 't15)>>}], impl core::future::future::Future, tracing_futures::Instrumented<impl core::future::future::Future>, ()}]`
    = note: required because it appears within the type `std::future::from_generator::GenFuture<[static generator@async-raft/src/core/append_entries.rs:10:5: 13:7 self:&mut core::RaftCore<D, R, N, S>, msg:raft::AppendEntriesRequest<D> for<'r, 's, 't0, 't1> {std::future::ResumeTy, &'r mut core::RaftCore<D, R, N, S>, raft::AppendEntriesRequest<D>, tracing::span::Span, [static generator@async-raft/src/core/append_entries.rs:14:133: 168:6 msg:raft::AppendEntriesRequest<D>, self:&'s mut core::RaftCore<D, R, N, S> for<'t2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15> {std::future::ResumeTy, bool, &'t2 mut core::RaftCore<D, R, N, S>, impl core::future::future::Future, (), &'t4 mut bool, impl core::future::future::Future, raft::AppendEntriesRequest<D>, std::vec::Vec<raft::Entry<D>>, &'t7 [raft::Entry<D>], &'t8 std::vec::Vec<raft::Entry<D>>, impl core::future::future::Future, core::RaftCore<D, R, N, S>, &'t11 S, std::sync::Arc<S>, u64, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::vec::Vec<raft::Entry<D>>, anyhow::Error>> + std::marker::Send + 't12)>>, &'t13 raft::Entry<D>, raft::Entry<D>, std::option::Option<u64>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<(), anyhow::Error>> + std::marker::Send + 't14)>>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<raft::MembershipConfig, anyhow::Error>> + std::marker::Send + 't15)>>}], impl core::future::future::Future, tracing_futures::Instrumented<impl core::future::future::Future>, ()}]>`
    = note: required because it appears within the type `impl core::future::future::Future`
    = note: required because it appears within the type `impl core::future::future::Future`
    = note: required because it appears within the type `for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15, 't16, 't17, 't18, 't19, 't20, 't21, 't22, 't23, 't24, 't25, 't26, 't27, 't28, 't29, 't30, 't31, 't32, 't33, 't34, 't35, 't36, 't37, 't38, 't39, 't40, 't41, 't42, 't43, 't44, 't45, 't46> {std::future::ResumeTy, std::vec::Vec<u64>, &'r mut core::LeaderState<'s, D, R, N, S>, core::LeaderState<'t0, D, R, N, S>, impl core::future::future::Future, (), u8, (tokio::stream::next::Next<'t4, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t5, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t6, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t7, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t8, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>), [closure@/home/mpostma/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.22/src/macros/select.rs:351:46: 425:14 disabled:&'t10 mut u8, futures:&'t11 mut (tokio::stream::next::Next<'t12, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t13, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t14, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t15, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t16, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>)], tokio::future::poll_fn::PollFn<[closure@/home/mpostma/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.22/src/macros/select.rs:351:46: 425:14 disabled:&'t18 mut u8, futures:&'t19 mut (tokio::stream::next::Next<'t20, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t21, tokio::sync::mpsc::bounded::Receiver<ic generator@async-raft/src/core/append_entries.rs:10:5: 13:7 self:&mut core::RaftCore<D, R, N, S>, msg:raft::AppendEntriesRequest<D> for<'r, 's, 't0, 't1> {std::future::ResumeTy, &'r mut core::RaftCore<D, R, N, S>, raft::AppendEntriesRequest<D>, tracing::span::Span, [static generator@async-raft/src/core/append_entries.rs:14:133: 168:6 msg:raft::AppendEntriesRequest<D>, self:&'s mut core::RaftCore<D, R, N, S> for<'t2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15> {std::future::ResumeTy, bool, &'t2 mut core::RaftCore<D, R, N, S>, impl core::future::future::Future, (), &'t4 mut bool, impl core::future::future::Future, raft::AppendEntriesRequest<D>, std::vec::Vec<raft::Entry<D>>, &'t7 [raft::Entry<D>], &'t8 std::vec::Vec<raft::Entry<D>>, impl core::future::future::Future, core::RaftCore<D, R, N, S>, &'t11 S, std::sync::Arc<S>, u64, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::vec::Vec<raft::Entry<D>>, anyhow::Error>> + std::marker::Send + 't12)>>, &'t13 raft::Entry<D>, raft::Entry<D>, std::option::Option<u64>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<(), anyhow::Error>> + std::marker::Send + 't14)>>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<raft::MembershipConfig, anyhow::Error>> + std::marker::Send + 't15)>>}], impl core::future::future::Future, tracing_futures::Instrumented<impl core::future::future::Future>, ()}]>`
    = note: required because it appears within the type `impl core::future::future::Future`
    = note: required because it appears within the type `impl core::future::future::Future`
    = note: required because it appears within the type `for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15, 't16, 't17, 't18, 't19, 't20, 't21, 't22, 't23, 't24, 't25, 't26, 't27, 't28, 't29, 't30, 't31, 't32, 't33, 't34, 't35, 't36, 't37, 't38, 't39, 't40, 't41, 't42, 't43, 't44, 't45, 't46> {std::future::ResumeTy, std::vec::Vec<u64>, &'r mut core::LeaderState<'s, D, R, N, S>, core::LeaderState<'t0, D, R, N, S>, impl core::future::future::Future, (), u8, (tokio::stream::next::Next<'t4, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t5, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t6, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t7, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t8, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>), [closure@/home/mpostma/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.22/src/macros/select.rs:351:46: 425:14 disabled:&'t10 mut u8, futures:&'t11 mut (tokio::stream::next::Next<'t12, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t13, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t14, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t15, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t16, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>)], tokio::future::poll_fn::PollFn<[closure@/home/mpostma/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.22/src/macros/select.rs:351:46: 425:14 disabled:&'t18 mut u8, futures:&'t19 mut (tokio::stream::next::Next<'t20, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t21, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t22, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t23, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t24, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>)]>, core::LeaderState<'a, D, R, N, S>::run::{{closure}}#0::{{closure}}#0::util::Out<std::option::Option<raft::RaftMsg<D, R>>, std::option::Option<core::SnapshotUpdate>, std::option::Option<std::result::Result<std::result::Result<u64, error::RaftError>, tokio::sync::oneshot::error::RecvError>>, std::option::Option<std::result::Result<std::result::Result<u64, error::RaftError>, tokio::sync::oneshot::error::RecvError>>, std::option::Option<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>, raft::RaftMsg<D, R>, raft::AppendEntriesRequest<D>, tokio::sync::oneshot::Sender<std::result::Result<raft::AppendEntriesResponse, error::RaftError>>, &'t25 mut core::RaftCore<D, R, N, S>, impl core::future::future::Future, raft::VoteRequest, tokio::sync::oneshot::Sender<std::result::Result<raft::VoteResponse, error::RaftError>>, impl core::future::future::Future, raft::InstallSnapshotRequest, tokio::sync::oneshot::Sender<std::result::Result<raft::InstallSnapshotResponse, error::RaftError>>, impl core::future::future::Future, tokio::sync::oneshot::Sender<std::result::Result<(), error::ClientReadError>>, impl core::future::future::Future, raft::ClientWriteRequest<D>, tokio::sync::oneshot::Sender<std::result::Result<raft::ClientWriteResponse<R>, error::ClientWriteError<D>>>, impl core::future::future::Future, std::collections::HashSet<u64>, tokio::sync::oneshot::Sender<std::result::Result<(), error::ChangeConfigError>>, impl core::future::future::Future, std::result::Result<u64, error::RaftError>, impl core::future::future::Future, u64, impl core::future::future::Future, replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>, impl core::future::future::Future}`
    = note: required because it appears within the type `[static generator@async-raft/src/core/mod.rs:555:56: 640:6 self:core::LeaderState<'_, D, R, N, S> for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15, 't16, 't17, 't18, 't19, 't20, 't21, 't22, 't23, 't24, 't25, 't26, 't27, 't28, 't29, 't30, 't31, 't32, 't33, 't34, 't35, 't36, 't37, 't38, 't39, 't40, 't41, 't42, 't43, 't44, 't45, 't46> {std::future::ResumeTy, std::vec::Vec<u64>, &'r mut core::LeaderState<'s, D, R, N, S>, core::LeaderState<'t0, D, R, N, S>, impl core::future::future::Future, (), u8, (tokio::stream::next::Next<'t4, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t5, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t6, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t7, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t8, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>), [closure@/home/mpostma/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.22/src/macros/select.rs:351:46: 425:14 disabled:&'t10 mut u8, futures:&'t11 mut (tokio::stream::next::Next<'t12, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t13, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t14, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t15, futures_util::stream::futures_ordered::Futurecore::SnapshotUpdate>>, tokio::stream::next::Next<'t22, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t23, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t24, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>)]>, core::LeaderState<'a, D, R, N, S>::run::{{closure}}#0::{{closure}}#0::util::Out<std::option::Option<raft::RaftMsg<D, R>>, std::option::Option<core::SnapshotUpdate>, std::option::Option<std::result::Result<std::result::Result<u64, error::RaftError>, tokio::sync::oneshot::error::RecvError>>, std::option::Option<std::result::Result<std::result::Result<u64, error::RaftError>, tokio::sync::oneshot::error::RecvError>>, std::option::Option<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>, raft::RaftMsg<D, R>, raft::AppendEntriesRequest<D>, tokio::sync::oneshot::Sender<std::result::Result<raft::AppendEntriesResponse, error::RaftError>>, &'t25 mut core::RaftCore<D, R, N, S>, impl core::future::future::Future, raft::VoteRequest, tokio::sync::oneshot::Sender<std::result::Result<raft::VoteResponse, error::RaftError>>, impl core::future::future::Future, raft::InstallSnapshotRequest, tokio::sync::oneshot::Sender<std::result::Result<raft::InstallSnapshotResponse, error::RaftError>>, impl core::future::future::Future, tokio::sync::oneshot::Sender<std::result::Result<(), error::ClientReadError>>, impl core::future::future::Future, raft::ClientWriteRequest<D>, tokio::sync::oneshot::Sender<std::result::Result<raft::ClientWriteResponse<R>, error::ClientWriteError<D>>>, impl core::future::future::Future, std::collections::HashSet<u64>, tokio::sync::oneshot::Sender<std::result::Result<(), error::ChangeConfigError>>, impl core::future::future::Future, std::result::Result<u64, error::RaftError>, impl core::future::future::Future, u64, impl core::future::future::Future, replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>, impl core::future::future::Future}`
    = note: required because it appears within the type `[static generator@async-raft/src/core/mod.rs:555:56: 640:6 self:core::LeaderState<'_, D, R, N, S> for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15, 't16, 't17, 't18, 't19, 't20, 't21, 't22, 't23, 't24, 't25, 't26, 't27, 't28, 't29, 't30, 't31, 't32, 't33, 't34, 't35, 't36, 't37, 't38, 't39, 't40, 't41, 't42, 't43, 't44, 't45, 't46> {std::future::ResumeTy, std::vec::Vec<u64>, &'r mut core::LeaderState<'s, D, R, N, S>, core::LeaderState<'t0, D, R, N, S>, impl core::future::future::Future, (), u8, (tokio::stream::next::Next<'t4, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t5, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t6, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t7, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t8, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>), [closure@/home/mpostma/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.22/src/macros/select.rs:351:46: 425:14 disabled:&'t10 mut u8, futures:&'t11 mut (tokio::stream::next::Next<'t12, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t13, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t14, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t15, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t16, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>)], tokio::future::poll_fn::PollFn<[closure@/home/mpostma/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.22/src/macros/select.rs:351:46: 425:14 disabled:&'t18 mut u8, futures:&'t19 mut (tokio::stream::next::Next<'t20, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t21, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t22, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t23, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t24, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>)]>, core::LeaderState<'a, D, R, N, S>::run::{{closure}}#0::{{closure}}#0::util::Out<std::option::Option<raft::RaftMsg<D, R>>, std::option::Option<core::SnapshotUpdate>, std::option::Option<std::result::Result<std::result::Result<u64, error::RaftError>, tokio::sync::oneshot::error::RecvError>>, std::option::Option<std::result::Result<std::result::Result<u64, error::RaftError>, tokio::sync::oneshot::error::RecvError>>, std::option::Option<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>, raft::RaftMsg<D, R>, raft::AppendEntriesRequest<D>, tokio::sync::oneshot::Sender<std::result::Result<raft::AppendEntriesResponse, error::RaftError>>, &'t25 mut core::RaftCore<D, R, N, S>, impl core::future::future::Future, raft::VoteRequest, tokio::sync::oneshot::Sender<std::result::Result<raft::VoteResponse, error::RaftError>>, impl core::future::future::Future, raft::InstallSnapshotRequest, tokio::sync::oneshot::Sender<std::result::Result<raft::InstallSnapshotResponse, error::RaftError>>, impl core::future::future::Future, tokio::sync::oneshot::Sender<std::result::Result<(), error::ClientReadError>>, impl core::future::future::Future, raft::ClientWriteRequest<D>, tokio::sync::oneshot::Sender<std::result::Result<raft::ClientWriteResponse<R>, error::ClientWriteError<D>>>, impl core::future::future::Future, std::collections::HashSet<u64>, tokio::sync::oneshot::Sender<std::result::Result<(), error::ChangeConfigError>>, impl core::future::future::Future, std::result::Result<u64, error::RaftError>, impl core::future::future::Future, u64, impl core::future::future::Future, replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>, impl core::future::future::Future}]`
    = note: required because it appears within the type `for<'r, 's, 't0, 't1, 't2, 't3, 't4> {std::future::ResumeTy, core::LeaderState<'r, D, R, N, S>, tracing::span::Span, [static generator@async-raft/src/core/mod.rs:555:56: 640:6 self:core::LeaderState<'t0, D, R, N, S> for<'t5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15, 't16, 't17, 't18, 't19, 't20, 't21, 't22, 't23, 't24, 't25, 't26, 't27, 't28, 't29, 't30, 't31, 't32, 't33, 't34, 't35, 't36, 't37, 't38, 't39, 't40, 't41, 't42, 't43, 't44, 't45, 't46, 't47, 't48, 't49, 't50, 't51, 't52, 't53> {std::future::ResumeTy, std::vec::Vec<u64>, &'t5 mut core::LeaderState<'t6, D, R, N, S>, core::LeaderState<'t7, D, R, N, S>, impl core::future::future::Future, (), u8, (tokio::stream::next::Next<'t11, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t12, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t13, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t14, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stresOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t16, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>)], tokio::future::poll_fn::PollFn<[closure@/home/mpostma/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.22/src/macros/select.rs:351:46: 425:14 disabled:&'t18 mut u8, futures:&'t19 mut (tokio::stream::next::Next<'t20, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t21, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t22, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t23, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t24, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>)]>, core::LeaderState<'a, D, R, N, S>::run::{{closure}}#0::{{closure}}#0::util::Out<std::option::Option<raft::RaftMsg<D, R>>, std::option::Option<core::SnapshotUpdate>, std::option::Option<std::result::Result<std::result::Result<u64, error::RaftError>, tokio::sync::oneshot::error::RecvError>>, std::option::Option<std::result::Result<std::result::Result<u64, error::RaftError>, tokio::sync::oneshot::error::RecvError>>, std::option::Option<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>, raft::RaftMsg<D, R>, raft::AppendEntriesRequest<D>, tokio::sync::oneshot::Sender<std::result::Result<raft::AppendEntriesResponse, error::RaftError>>, &'t25 mut core::RaftCore<D, R, N, S>, impl core::future::future::Future, raft::VoteRequest, tokio::sync::oneshot::Sender<std::result::Result<raft::VoteResponse, error::RaftError>>, impl core::future::future::Future, raft::InstallSnapshotRequest, tokio::sync::oneshot::Sender<std::result::Result<raft::InstallSnapshotResponse, error::RaftError>>, impl core::future::future::Future, tokio::sync::oneshot::Sender<std::result::Result<(), error::ClientReadError>>, impl core::future::future::Future, raft::ClientWriteRequest<D>, tokio::sync::oneshot::Sender<std::result::Result<raft::ClientWriteResponse<R>, error::ClientWriteError<D>>>, impl core::future::future::Future, std::collections::HashSet<u64>, tokio::sync::oneshot::Sender<std::result::Result<(), error::ChangeConfigError>>, impl core::future::future::Future, std::result::Result<u64, error::RaftError>, impl core::future::future::Future, u64, impl core::future::future::Future, replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>, impl core::future::future::Future}]`
    = note: required because it appears within the type `for<'r, 's, 't0, 't1, 't2, 't3, 't4> {std::future::ResumeTy, core::LeaderState<'r, D, R, N, S>, tracing::span::Span, [static generator@async-raft/src/core/mod.rs:555:56: 640:6 self:core::LeaderState<'t0, D, R, N, S> for<'t5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15, 't16, 't17, 't18, 't19, 't20, 't21, 't22, 't23, 't24, 't25, 't26, 't27, 't28, 't29, 't30, 't31, 't32, 't33, 't34, 't35, 't36, 't37, 't38, 't39, 't40, 't41, 't42, 't43, 't44, 't45, 't46, 't47, 't48, 't49, 't50, 't51, 't52, 't53> {std::future::ResumeTy, std::vec::Vec<u64>, &'t5 mut core::LeaderState<'t6, D, R, N, S>, core::LeaderState<'t7, D, R, N, S>, impl core::future::future::Future, (), u8, (tokio::stream::next::Next<'t11, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t12, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t13, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t14, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t15, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>), [closure@/home/mpostma/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.22/src/macros/select.rs:351:46: 425:14 disabled:&'t17 mut u8, futures:&'t18 mut (tokio::stream::next::Next<'t19, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t20, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t21, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t22, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t23, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>)], tokio::future::poll_fn::PollFn<[closure@/home/mpostma/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.22/src/macros/select.rs:351:46: 425:14 disabled:&'t25 mut u8, futures:&'t26 mut (tokio::stream::next::Next<'t27, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t28, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t29, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t30, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t31, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>)]>, core::LeaderState<'a, D, R, N, S>::run::{{closure}}#0::{{closure}}#0::util::Out<std::option::Option<raft::RaftMsg<D, R>>, std::option::Option<core::SnapshotUpdate>, std::option::Option<std::result::Result<std::result::Result<u64, error::RaftError>, tokio::sync::oneshot::error::RecvError>>, std::option::Option<std::result::Result<std::result::Result<u64, error::RaftError>, tokio::sync::oneshot::error::RecvError>>, std::option::Option<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>, raft::RaftMsg<D, R>, raft::AppendEntriesRequest<D>, tokio::sync::oneshot::Sender<std::result::Result<raft::AppendEntriesResponse, error::RaftError>>, &'t32 mut core::RaftCore<D, R, N, S>, impl core::future::future::Future, raft::VoteRequest, tokio::sync::oneshot::Sender<std::result::Result<raft::VoteResponse, error::RaftError>>, impl core::future::future::Future, raft::InstallSnapshotRequest, tokio::sync::oneshot::Sender<std::result::Result<raft::InstallSnapshotResponse, error::RaftError>>, impl core::future::future::Future, tokio::sync::oneshot::Sender<std::result::Result<(), error::ClientReadError>>, impl core::future::future::Future, raft::ClientWriteRequest<D>, tokio::sync::oneshot::Sender<std::result::Result<raft::ClientWriteResponse<R>, error::ClientWriteError<D>>>, impl core::future::future::Future, std::collections::HashSet<u64>, tokio::sync::oneshot::Sender<std::result::Result<(), error::ChangeConfigError>>, impl core::future::future::Future, std::result::Result<u64, error::RaftError>, impl core::future::future::Future, u64, impl core::future::future::Future, replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>, impl core::future::future::Future}], impl core::future::future::Future, tracing_futures::Instrumented<impl core::future::future::Future>, ()}`
    = note: required because it appears within the type `[static generator@async-raft/src/core/mod.rs:554:5: 554:100 __arg0:core::LeaderState<'_, D, R, N, S> for<'r, 's, 't0, 't1, 't2, 't3, 't4> {std::future::ResumeTy, core::LeaderState<'r, D, R, N, S>, tracing::span::Span, [static generator@async-raft/src/core/mod.rs:555:56: 640:6 self:core::LeaderState<'t0, D, R, N, S> for<'t5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, am::next::Next<'t15, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>), [closure@/home/mpostma/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.22/src/macros/select.rs:351:46: 425:14 disabled:&'t17 mut u8, futures:&'t18 mut (tokio::stream::next::Next<'t19, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t20, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t21, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t22, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t23, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>)], tokio::future::poll_fn::PollFn<[closure@/home/mpostma/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.22/src/macros/select.rs:351:46: 425:14 disabled:&'t25 mut u8, futures:&'t26 mut (tokio::stream::next::Next<'t27, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t28, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t29, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t30, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t31, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>)]>, core::LeaderState<'a, D, R, N, S>::run::{{closure}}#0::{{closure}}#0::util::Out<std::option::Option<raft::RaftMsg<D, R>>, std::option::Option<core::SnapshotUpdate>, std::option::Option<std::result::Result<std::result::Result<u64, error::RaftError>, tokio::sync::oneshot::error::RecvError>>, std::option::Option<std::result::Result<std::result::Result<u64, error::RaftError>, tokio::sync::oneshot::error::RecvError>>, std::option::Option<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>, raft::RaftMsg<D, R>, raft::AppendEntriesRequest<D>, tokio::sync::oneshot::Sender<std::result::Result<raft::AppendEntriesResponse, error::RaftError>>, &'t32 mut core::RaftCore<D, R, N, S>, impl core::future::future::Future, raft::VoteRequest, tokio::sync::oneshot::Sender<std::result::Result<raft::VoteResponse, error::RaftError>>, impl core::future::future::Future, raft::InstallSnapshotRequest, tokio::sync::oneshot::Sender<std::result::Result<raft::InstallSnapshotResponse, error::RaftError>>, impl core::future::future::Future, tokio::sync::oneshot::Sender<std::result::Result<(), error::ClientReadError>>, impl core::future::future::Future, raft::ClientWriteRequest<D>, tokio::sync::oneshot::Sender<std::result::Result<raft::ClientWriteResponse<R>, error::ClientWriteError<D>>>, impl core::future::future::Future, std::collections::HashSet<u64>, tokio::sync::oneshot::Sender<std::result::Result<(), error::ChangeConfigError>>, impl core::future::future::Future, std::result::Result<u64, error::RaftError>, impl core::future::future::Future, u64, impl core::future::future::Future, replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>, impl core::future::future::Future}], impl core::future::future::Future, tracing_futures::Instrumented<impl core::future::future::Future>, ()}`
    = note: required because it appears within the type `[static generator@async-raft/src/core/mod.rs:554:5: 554:100 __arg0:core::LeaderState<'_, D, R, N, S> for<'r, 's, 't0, 't1, 't2, 't3, 't4> {std::future::ResumeTy, core::LeaderState<'r, D, R, N, S>, tracing::span::Span, [static generator@async-raft/src/core/mod.rs:555:56: 640:6 self:core::LeaderState<'t0, D, R, N, S> for<'t5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15, 't16, 't17, 't18, 't19, 't20, 't21, 't22, 't23, 't24, 't25, 't26, 't27, 't28, 't29, 't30, 't31, 't32, 't33, 't34, 't35, 't36, 't37, 't38, 't39, 't40, 't41, 't42, 't43, 't44, 't45, 't46, 't47, 't48, 't49, 't50, 't51, 't52, 't53> {std::future::ResumeTy, std::vec::Vec<u64>, &'t5 mut core::LeaderState<'t6, D, R, N, S>, core::LeaderState<'t7, D, R, N, S>, impl core::future::future::Future, (), u8, (tokio::stream::next::Next<'t11, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t12, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t13, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t14, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t15, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>), [closure@/home/mpostma/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.22/src/macros/select.rs:351:46: 425:14 disabled:&'t17 mut u8, futures:&'t18 mut (tokio::stream::next::Next<'t19, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t20, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t21, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t22, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t23, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>)], tokio::future::poll_fn::PollFn<[closure@/home/mpostma/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.22/src/macros/select.rs:351:46: 425:14 disabled:&'t25 mut u8, futures:&'t26 mut (tokio::stream::next::Next<'t27, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t28, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t29, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t30, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t31, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>)]>, core::LeaderState<'a, D, R, N, S>::run::{{closure}}#0::{{closure}}#0::util::Out<std::option::Option<raft::RaftMsg<D, R>>, std::option::Option<core::SnapshotUpdate>, std::option::Option<std::result::Result<std::result::Result<u64, error::RaftError>, tokio::sync::oneshot::error::RecvError>>, std::option::Option<std::result::Result<std::result::Result<u64, error::RaftError>, tokio::sync::oneshot::error::RecvError>>, std::option::Option<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>, raft::RaftMsg<D, R>, raft::AppendEntriesRequest<D>, tokio::sync::oneshot::Sender<std::result::Result<raft::AppendEntriesResponse, error::RaftError>>, &'t32 mut core::RaftCore<D, R, N, S>, impl core::future::future::Future, raft::VoteRequest, tokio::sync::oneshot::Sender<std::result::Result<raft::VoteResponse, error::RaftError>>, impl core::future::future::Future, raft::InstallSnapshotRequest, tokio::sync::oneshot::Sender<std::result::Result<raft::InstallSnapshotResponse, error::RaftError>>, impl core::future::future::Future, tokio::sync::oneshot::Sender<std::result::Result<(), error::ClientReadError>>, impl core::future::future::Future, raft::ClientWriteRequest<D>, tokio::sync::oneshot::Sender<std::result::Result<raft::ClientWriteResponse<R>, error::ClientWrite't13, 't14, 't15, 't16, 't17, 't18, 't19, 't20, 't21, 't22, 't23, 't24, 't25, 't26, 't27, 't28, 't29, 't30, 't31, 't32, 't33, 't34, 't35, 't36, 't37, 't38, 't39, 't40, 't41, 't42, 't43, 't44, 't45, 't46, 't47, 't48, 't49, 't50, 't51, 't52, 't53> {std::future::ResumeTy, std::vec::Vec<u64>, &'t5 mut core::LeaderState<'t6, D, R, N, S>, core::LeaderState<'t7, D, R, N, S>, impl core::future::future::Future, (), u8, (tokio::stream::next::Next<'t11, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t12, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t13, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t14, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t15, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>), [closure@/home/mpostma/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.22/src/macros/select.rs:351:46: 425:14 disabled:&'t17 mut u8, futures:&'t18 mut (tokio::stream::next::Next<'t19, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t20, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t21, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t22, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t23, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>)], tokio::future::poll_fn::PollFn<[closure@/home/mpostma/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.22/src/macros/select.rs:351:46: 425:14 disabled:&'t25 mut u8, futures:&'t26 mut (tokio::stream::next::Next<'t27, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t28, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t29, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t30, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t31, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>)]>, core::LeaderState<'a, D, R, N, S>::run::{{closure}}#0::{{closure}}#0::util::Out<std::option::Option<raft::RaftMsg<D, R>>, std::option::Option<core::SnapshotUpdate>, std::option::Option<std::result::Result<std::result::Result<u64, error::RaftError>, tokio::sync::oneshot::error::RecvError>>, std::option::Option<std::result::Result<std::result::Result<u64, error::RaftError>, tokio::sync::oneshot::error::RecvError>>, std::option::Option<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>, raft::RaftMsg<D, R>, raft::AppendEntriesRequest<D>, tokio::sync::oneshot::Sender<std::result::Result<raft::AppendEntriesResponse, error::RaftError>>, &'t32 mut core::RaftCore<D, R, N, S>, impl core::future::future::Future, raft::VoteRequest, tokio::sync::oneshot::Sender<std::result::Result<raft::VoteResponse, error::RaftError>>, impl core::future::future::Future, raft::InstallSnapshotRequest, tokio::sync::oneshot::Sender<std::result::Result<raft::InstallSnapshotResponse, error::RaftError>>, impl core::future::future::Future, tokio::sync::oneshot::Sender<std::result::Result<(), error::ClientReadError>>, impl core::future::future::Future, raft::ClientWriteRequest<D>, tokio::sync::oneshot::Sender<std::result::Result<raft::ClientWriteResponse<R>, error::ClientWriteError<D>>>, impl core::future::future::Future, std::collections::HashSet<u64>, tokio::sync::oneshot::Sender<std::result::Result<(), error::ChangeConfigError>>, impl core::future::future::Future, std::result::Result<u64, error::RaftError>, impl core::future::future::Future, u64, impl core::future::future::Future, replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>, impl core::future::future::Future}], impl core::future::future::Future, tracing_futures::Instrumented<impl core::future::future::Future>, ()}]`
    = note: required because it appears within the type `std::future::from_generator::GenFuture<[static generator@async-raft/src/core/mod.rs:554:5: 554:100 __arg0:core::LeaderState<'_, D, R, N, S> for<'r, 's, 't0, 't1, 't2, 't3, 't4> {std::future::ResumeTy, core::LeaderState<'r, D, R, N, S>, tracing::span::Span, [static generator@async-raft/src/core/mod.rs:555:56: 640:6 self:core::LeaderState<'t0, D, R, N, S> for<'t5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15, 't16, 't17, 't18, 't19, 't20, 't21, 't22, 't23, 't24, 't25, 't26, 't27, 't28, 't29, 't30, 't31, 't32, 't33, 't34, 't35, 't36, 't37, 't38, 't39, 't40, 't41, 't42, 't43, 't44, 't45, 't46, 't47, 't48, 't49, 't50, 't51, 't52, 't53> {std::future::ResumeTy, std::vec::Vec<u64>, &'t5 mut core::LeaderState<'t6, D, R, N, S>, core::LeaderState<'t7, D, R, N, S>, impl core::future::future::Future, (), u8, (tokio::stream::next::Next<'t11, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t12, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t13, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t14, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t15, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>), [closure@/home/mpostma/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.22/src/macros/select.rs:351:46: 425:14 disabled:&'t17 mut u8, futures:&'t18 mut (tokio::stream::next::Next<'t19, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t20, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t21, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t22, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t23, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>)], tokio::future::poll_fn::PollFn<[closure@/home/mpostma/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.22/src/macros/select.rs:351:46: 425:14 disabled:&'t25 mut u8, futures:&'t26 mut (tokio::stream::next::Next<'t27, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t28, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t29, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t30, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t31, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>)]>, core::LeaderState<'a, D, R, N, S>::run::{{closure}}#0::{{closure}}#0::util::Out<std::option::Option<raft::RaftMsg<D, R>>, std::option::Option<core::SnapshotUpdate>, std::option::Option<std::result::Result<std::result::Result<u64, error::RaftError>, tokio::sync::oneshot::error::RecvError>>, sError<D>>>, impl core::future::future::Future, std::collections::HashSet<u64>, tokio::sync::oneshot::Sender<std::result::Result<(), error::ChangeConfigError>>, impl core::future::future::Future, std::result::Result<u64, error::RaftError>, impl core::future::future::Future, u64, impl core::future::future::Future, replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>, impl core::future::future::Future}], impl core::future::future::Future, tracing_futures::Instrumented<impl core::future::future::Future>, ()}]`
    = note: required because it appears within the type `std::future::from_generator::GenFuture<[static generator@async-raft/src/core/mod.rs:554:5: 554:100 __arg0:core::LeaderState<'_, D, R, N, S> for<'r, 's, 't0, 't1, 't2, 't3, 't4> {std::future::ResumeTy, core::LeaderState<'r, D, R, N, S>, tracing::span::Span, [static generator@async-raft/src/core/mod.rs:555:56: 640:6 self:core::LeaderState<'t0, D, R, N, S> for<'t5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15, 't16, 't17, 't18, 't19, 't20, 't21, 't22, 't23, 't24, 't25, 't26, 't27, 't28, 't29, 't30, 't31, 't32, 't33, 't34, 't35, 't36, 't37, 't38, 't39, 't40, 't41, 't42, 't43, 't44, 't45, 't46, 't47, 't48, 't49, 't50, 't51, 't52, 't53> {std::future::ResumeTy, std::vec::Vec<u64>, &'t5 mut core::LeaderState<'t6, D, R, N, S>, core::LeaderState<'t7, D, R, N, S>, impl core::future::future::Future, (), u8, (tokio::stream::next::Next<'t11, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t12, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t13, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t14, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t15, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>), [closure@/home/mpostma/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.22/src/macros/select.rs:351:46: 425:14 disabled:&'t17 mut u8, futures:&'t18 mut (tokio::stream::next::Next<'t19, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t20, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t21, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t22, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t23, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>)], tokio::future::poll_fn::PollFn<[closure@/home/mpostma/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.22/src/macros/select.rs:351:46: 425:14 disabled:&'t25 mut u8, futures:&'t26 mut (tokio::stream::next::Next<'t27, tokio::sync::mpsc::unbounded::UnboundedReceiver<raft::RaftMsg<D, R>>>, tokio::stream::next::Next<'t28, tokio::sync::mpsc::bounded::Receiver<core::SnapshotUpdate>>, tokio::stream::next::Next<'t29, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t30, futures_util::stream::futures_ordered::FuturesOrdered<tokio::sync::oneshot::Receiver<std::result::Result<u64, error::RaftError>>>>, tokio::stream::next::Next<'t31, tokio::sync::mpsc::unbounded::UnboundedReceiver<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>)]>, core::LeaderState<'a, D, R, N, S>::run::{{closure}}#0::{{closure}}#0::util::Out<std::option::Option<raft::RaftMsg<D, R>>, std::option::Option<core::SnapshotUpdate>, std::option::Option<std::result::Result<std::result::Result<u64, error::RaftError>, tokio::sync::oneshot::error::RecvError>>, std::option::Option<std::result::Result<std::result::Result<u64, error::RaftError>, tokio::sync::oneshot::error::RecvError>>, std::option::Option<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>, raft::RaftMsg<D, R>, raft::AppendEntriesRequest<D>, tokio::sync::oneshot::Sender<std::result::Result<raft::AppendEntriesResponse, error::RaftError>>, &'t32 mut core::RaftCore<D, R, N, S>, impl core::future::future::Future, raft::VoteRequest, tokio::sync::oneshot::Sender<std::result::Result<raft::VoteResponse, error::RaftError>>, impl core::future::future::Future, raft::InstallSnapshotRequest, tokio::sync::oneshot::Sender<std::result::Result<raft::InstallSnapshotResponse, error::RaftError>>, impl core::future::future::Future, tokio::sync::oneshot::Sender<std::result::Result<(), error::ClientReadError>>, impl core::future::future::Future, raft::ClientWriteRequest<D>, tokio::sync::oneshot::Sender<std::result::Result<raft::ClientWriteResponse<R>, error::ClientWriteError<D>>>, impl core::future::future::Future, std::collections::HashSet<u64>, tokio::sync::oneshot::Sender<std::result::Result<(), error::ChangeConfigError>>, impl core::future::future::Future, std::result::Result<u64, error::RaftError>, impl core::future::future::Future, u64, impl core::future::future::Future, replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>, impl core::future::future::Future}], impl core::future::future::Future, tracing_futures::Instrumented<impl core::future::future::Future>, ()}]>`
    = note: required because it appears within the type `impl core::future::future::Future`
    = note: required because it appears within the type `impl core::future::future::Future`
    = note: required because it appears within the type `for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14> {std::future::ResumeTy, core::RaftCore<D, R, N, S>, &'r S, std::sync::Arc<S>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<storage::InitialState, anyhow::Error>> + std::marker::Send + 's)>>, (), storage::InitialState, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::option::Option<storage::CurrentSnapshotData<<S as storage::RaftStorage<D, R>>::Snapshot>>, anyhow::Error>> + std::marker::Send + 't0)>>, bool, core::State, &'t1 core::State, &'t2 mut core::RaftCore<D, R, N, S>, core::LeaderState<'t3, D, R, N, S>, impl core::future::future::Future, core::CandidateState<'t6, D, R, N, S>, impl core::future::future::Future, core::FollowerState<'t9, D, R, N, S>, impl core::future::future::Future, core::NonVoterState<'t12, D, R, N, S>, impl core::future::future::Future}`
    = note: required because it appears within the type `[static generator@async-raft/src/core/mod.rs:141:47: 194:6 self:core::RaftCore<D, R, N, S> for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14> {std::future::ResumeTy, core::RaftCore<D, R, N, S>, &'r S, std::sync::Arc<S>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<storage::InitialState, anyhow::Error>> + std::marker::Send + 's)>>, (), storage::InitialState, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::option::Option<storage::CurrentSnapshotData<<S as storage::RaftStorage<D, R>>::Snapshot>>, anyhow::Error>> + std::marker::Send + 't0)>>, bool, core::State, &'t1 core::State, &'t2 mut core::RaftCore<D, R, N, S>, core::LeaderState<'t3, D, R, N, S>, impl core::future::future::Future, core::CandidateState<'t6, D, R, N, S>, impl core::future::future::Future, core::FollowerState<'t9, D, R, N, S>, impl core::future::future::Future, core::NonVoterState<'t12, D, R, N, S>, impl core::future::future::Future}]`
    = note: required because it appears within the type `{std::future::ResumeTy, core::RaftCore<D, R, N, S>, tracing::span::Span, [static generator@async-raft/src/core/mod.rs:141:47: 194:6 self:core::RaftCore<D, R, N, S> for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5td::option::Option<std::result::Result<std::result::Result<u64, error::RaftError>, tokio::sync::oneshot::error::RecvError>>, std::option::Option<replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>>>, raft::RaftMsg<D, R>, raft::AppendEntriesRequest<D>, tokio::sync::oneshot::Sender<std::result::Result<raft::AppendEntriesResponse, error::RaftError>>, &'t32 mut core::RaftCore<D, R, N, S>, impl core::future::future::Future, raft::VoteRequest, tokio::sync::oneshot::Sender<std::result::Result<raft::VoteResponse, error::RaftError>>, impl core::future::future::Future, raft::InstallSnapshotRequest, tokio::sync::oneshot::Sender<std::result::Result<raft::InstallSnapshotResponse, error::RaftError>>, impl core::future::future::Future, tokio::sync::oneshot::Sender<std::result::Result<(), error::ClientReadError>>, impl core::future::future::Future, raft::ClientWriteRequest<D>, tokio::sync::oneshot::Sender<std::result::Result<raft::ClientWriteResponse<R>, error::ClientWriteError<D>>>, impl core::future::future::Future, std::collections::HashSet<u64>, tokio::sync::oneshot::Sender<std::result::Result<(), error::ChangeConfigError>>, impl core::future::future::Future, std::result::Result<u64, error::RaftError>, impl core::future::future::Future, u64, impl core::future::future::Future, replication::ReplicaEvent<<S as storage::RaftStorage<D, R>>::Snapshot>, impl core::future::future::Future}], impl core::future::future::Future, tracing_futures::Instrumented<impl core::future::future::Future>, ()}]>`
    = note: required because it appears within the type `impl core::future::future::Future`
    = note: required because it appears within the type `impl core::future::future::Future`
    = note: required because it appears within the type `for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14> {std::future::ResumeTy, core::RaftCore<D, R, N, S>, &'r S, std::sync::Arc<S>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<storage::InitialState, anyhow::Error>> + std::marker::Send + 's)>>, (), storage::InitialState, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::option::Option<storage::CurrentSnapshotData<<S as storage::RaftStorage<D, R>>::Snapshot>>, anyhow::Error>> + std::marker::Send + 't0)>>, bool, core::State, &'t1 core::State, &'t2 mut core::RaftCore<D, R, N, S>, core::LeaderState<'t3, D, R, N, S>, impl core::future::future::Future, core::CandidateState<'t6, D, R, N, S>, impl core::future::future::Future, core::FollowerState<'t9, D, R, N, S>, impl core::future::future::Future, core::NonVoterState<'t12, D, R, N, S>, impl core::future::future::Future}`
    = note: required because it appears within the type `[static generator@async-raft/src/core/mod.rs:141:47: 194:6 self:core::RaftCore<D, R, N, S> for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14> {std::future::ResumeTy, core::RaftCore<D, R, N, S>, &'r S, std::sync::Arc<S>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<storage::InitialState, anyhow::Error>> + std::marker::Send + 's)>>, (), storage::InitialState, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::option::Option<storage::CurrentSnapshotData<<S as storage::RaftStorage<D, R>>::Snapshot>>, anyhow::Error>> + std::marker::Send + 't0)>>, bool, core::State, &'t1 core::State, &'t2 mut core::RaftCore<D, R, N, S>, core::LeaderState<'t3, D, R, N, S>, impl core::future::future::Future, core::CandidateState<'t6, D, R, N, S>, impl core::future::future::Future, core::FollowerState<'t9, D, R, N, S>, impl core::future::future::Future, core::NonVoterState<'t12, D, R, N, S>, impl core::future::future::Future}]`
    = note: required because it appears within the type `{std::future::ResumeTy, core::RaftCore<D, R, N, S>, tracing::span::Span, [static generator@async-raft/src/core/mod.rs:141:47: 194:6 self:core::RaftCore<D, R, N, S> for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14> {std::future::ResumeTy, core::RaftCore<D, R, N, S>, &'r S, std::sync::Arc<S>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<storage::InitialState, anyhow::Error>> + std::marker::Send + 's)>>, (), storage::InitialState, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::option::Option<storage::CurrentSnapshotData<<S as storage::RaftStorage<D, R>>::Snapshot>>, anyhow::Error>> + std::marker::Send + 't0)>>, bool, core::State, &'t1 core::State, &'t2 mut core::RaftCore<D, R, N, S>, core::LeaderState<'t3, D, R, N, S>, impl core::future::future::Future, core::CandidateState<'t6, D, R, N, S>, impl core::future::future::Future, core::FollowerState<'t9, D, R, N, S>, impl core::future::future::Future, core::NonVoterState<'t12, D, R, N, S>, impl core::future::future::Future}], impl core::future::future::Future, tracing_futures::Instrumented<impl core::future::future::Future>, ()}`
    = note: required because it appears within the type `[static generator@async-raft/src/core/mod.rs:140:5: 140:109 __arg0:core::RaftCore<D, R, N, S> {std::future::ResumeTy, core::RaftCore<D, R, N, S>, tracing::span::Span, [static generator@async-raft/src/core/mod.rs:141:47: 194:6 self:core::RaftCore<D, R, N, S> for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14> {std::future::ResumeTy, core::RaftCore<D, R, N, S>, &'r S, std::sync::Arc<S>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<storage::InitialState, anyhow::Error>> + std::marker::Send + 's)>>, (), storage::InitialState, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::option::Option<storage::CurrentSnapshotData<<S as storage::RaftStorage<D, R>>::Snapshot>>, anyhow::Error>> + std::marker::Send + 't0)>>, bool, core::State, &'t1 core::State, &'t2 mut core::RaftCore<D, R, N, S>, core::LeaderState<'t3, D, R, N, S>, impl core::future::future::Future, core::CandidateState<'t6, D, R, N, S>, impl core::future::future::Future, core::FollowerState<'t9, D, R, N, S>, impl core::future::future::Future, core::NonVoterState<'t12, D, R, N, S>, impl core::future::future::Future}], impl core::future::future::Future, tracing_futures::Instrumented<impl core::future::future::Future>, ()}]`
    = note: required because it appears within the type `std::future::from_generator::GenFuture<[static generator@async-raft/src/core/mod.rs:140:5: 140:109 __arg0:core::RaftCore<D, R, N, S> {std::future::ResumeTy, core::RaftCore<D, R, N, S>, tracing::span::Span, [static generator@async-raft/src/core/mod.rs:141:47: 194:6 self:core::RaftCore<D, R, N, S> for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14> {std::future::ResumeTy, core::RaftCore<D, R, N, S>, &'r S, std::sync::Arc<S>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<storage::InitialState, anyhow::Error>> + std::marker::Send + 's)>>, (), storage::InitialState, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::option::Option<storage::CurrentSnapshotData<<S as storage::RaftStorage<D, R>>::Snapshot>>, anyhow::Error>> + std::marker::Send + 't0)>>, bool, core::State, &'t1 core::State, &'t2 mut core::RaftCore<D, R, N, S>, core::LeaderState<'t3, D, R, N, S>, impl core::future::future::Future, core::CandidateState<'t6, D, R, N, S>, impl core::future::future::Future, core::FollowerState<'t9, D, R, N, S>, impl core::future::future::Future, core::NonVoterState<'t12, D, R, N, S>, impl core::future::future::Future}], impl core::future::future::Future, tracing_futures::Instrumented<impl core::future::future::Future>, ()}]>`
    = note: required because it appears within the type `impl core::future::future::Future`
    = note: required because it appears within the type `impl core::future::future::Future`
help: consider further restricting the associated type
    |
109 |     ) ->, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14> {std::future::ResumeTy, core::RaftCore<D, R, N, S>, &'r S, std::sync::Arc<S>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<storage::InitialState, anyhow::Error>> + std::marker::Send + 's)>>, (), storage::InitialState, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::option::Option<storage::CurrentSnapshotData<<S as storage::RaftStorage<D, R>>::Snapshot>>, anyhow::Error>> + std::marker::Send + 't0)>>, bool, core::State, &'t1 core::State, &'t2 mut core::RaftCore<D, R, N, S>, core::LeaderState<'t3, D, R, N, S>, impl core::future::future::Future, core::CandidateState<'t6, D, R, N, S>, impl core::future::future::Future, core::FollowerState<'t9, D, R, N, S>, impl core::future::future::Future, core::NonVoterState<'t12, D, R, N, S>, impl core::future::future::Future}], impl core::future::future::Future, tracing_futures::Instrumented<impl core::future::future::Future>, ()}`
    = note: required because it appears within the type `[static generator@async-raft/src/core/mod.rs:140:5: 140:109 __arg0:core::RaftCore<D, R, N, S> {std::future::ResumeTy, core::RaftCore<D, R, N, S>, tracing::span::Span, [static generator@async-raft/src/core/mod.rs:141:47: 194:6 self:core::RaftCore<D, R, N, S> for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14> {std::future::ResumeTy, core::RaftCore<D, R, N, S>, &'r S, std::sync::Arc<S>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<storage::InitialState, anyhow::Error>> + std::marker::Send + 's)>>, (), storage::InitialState, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::option::Option<storage::CurrentSnapshotData<<S as storage::RaftStorage<D, R>>::Snapshot>>, anyhow::Error>> + std::marker::Send + 't0)>>, bool, core::State, &'t1 core::State, &'t2 mut core::RaftCore<D, R, N, S>, core::LeaderState<'t3, D, R, N, S>, impl core::future::future::Future, core::CandidateState<'t6, D, R, N, S>, impl core::future::future::Future, core::FollowerState<'t9, D, R, N, S>, impl core::future::future::Future, core::NonVoterState<'t12, D, R, N, S>, impl core::future::future::Future}], impl core::future::future::Future, tracing_futures::Instrumented<impl core::future::future::Future>, ()}]`
    = note: required because it appears within the type `std::future::from_generator::GenFuture<[static generator@async-raft/src/core/mod.rs:140:5: 140:109 __arg0:core::RaftCore<D, R, N, S> {std::future::ResumeTy, core::RaftCore<D, R, N, S>, tracing::span::Span, [static generator@async-raft/src/core/mod.rs:141:47: 194:6 self:core::RaftCore<D, R, N, S> for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14> {std::future::ResumeTy, core::RaftCore<D, R, N, S>, &'r S, std::sync::Arc<S>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<storage::InitialState, anyhow::Error>> + std::marker::Send + 's)>>, (), storage::InitialState, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<std::option::Option<storage::CurrentSnapshotData<<S as storage::RaftStorage<D, R>>::Snapshot>>, anyhow::Error>> + std::marker::Send + 't0)>>, bool, core::State, &'t1 core::State, &'t2 mut core::RaftCore<D, R, N, S>, core::LeaderState<'t3, D, R, N, S>, impl core::future::future::Future, core::CandidateState<'t6, D, R, N, S>, impl core::future::future::Future, core::FollowerState<'t9, D, R, N, S>, impl core::future::future::Future, core::NonVoterState<'t12, D, R, N, S>, impl core::future::future::Future}], impl core::future::future::Future, tracing_futures::Instrumented<impl core::future::future::Future>, ()}]>`
    = note: required because it appears within the type `impl core::future::future::Future`
    = note: required because it appears within the type `impl core::future::future::Future`
help: consider further restricting the associated type
    |
109 |     ) -> JoinHandle<RaftResult<()>> where <S as storage::RaftStorage<D, R>>::Snapshot: std::marker::Sync {
    |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

 JoinHandle<RaftResult<()>> where <S as storage::RaftStorage<D, R>>::Snapshot: std::marker::Sync {
    |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
error: could not compile `async-raft`.

To learn more, run the command again with --verbose.
error: could not compile `async-raft`.

To learn more, run the command again with --verbose.

@MarinPostma MarinPostma added the C-bug Category: This is a bug. label Oct 24, 2020
@MarinPostma MarinPostma changed the title Incomprehensible type error when defining getter and setters Incomprehensible type error when defining getter and setter Oct 24, 2020
@jyn514
Copy link
Member

jyn514 commented Oct 25, 2020

What is the type error? you posted it under 'Backtrace'

@camelid camelid added A-async-await Area: Async & Await A-typesystem Area: The type system D-confusing Confusing diagnostic error that should be reworked E-needs-mcve Call for participation: This issue needs a Minimal Complete and Verifiable Example labels Oct 25, 2020
@jyn514 jyn514 added D-verbose Too much output caused by a single piece of incorrect code A-diagnostics Area: Messages for errors, warnings, and lints labels Oct 25, 2020
@jyn514
Copy link
Member

jyn514 commented Oct 25, 2020

I don't think this is actually a bug - changing it from a field to a method requires that you move the whole struct into the closure instead of just a single field. The error message is pretty bad, though.

I think you can work around this with

let main = this.main();
async {
    tokio::spawn(main)
}

@jyn514 jyn514 added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. and removed C-bug Category: This is a bug. labels Oct 25, 2020
@MarinPostma
Copy link
Author

@jyn514 Unfortunately, the same error remains. I am unable to produce a mcve, so I created a branch to isolate the issue, the code that produces the error is there: https://github.com/MarinPostma/async-raft/blob/broken-rust/async-raft/src/core/mod.rs#L105-L137.

@tmandry tmandry added the AsyncAwait-Triaged Async-await issues that have been triaged during a working group meeting. label Nov 10, 2020
@tmandry
Copy link
Contributor

tmandry commented Nov 10, 2020

We have code to produce error messages which explain why a particular Future type doesn't satisfy a trait bound, like Send, but it's not working in this case. It would be worth trying to understand why. For that we'll need to minimize the code futher.

@estebank
Copy link
Contributor

Triage, current output:

error[E0277]: `<S as RaftStorage<D, R>>::Snapshot` cannot be shared between threads safely
   --> async-raft/src/core/mod.rs:136:22
    |
136 |         tokio::spawn(this.main())
    |         ------------ ^^^^^^^^^^^ `<S as RaftStorage<D, R>>::Snapshot` cannot be shared between threads safely
    |         |
    |         required by a bound introduced by this call
    |
    = help: the trait `Sync` is not implemented for `<S as RaftStorage<D, R>>::Snapshot`
    = note: required for `Unique<<S as RaftStorage<D, R>>::Snapshot>` to implement `Sync`
    = note: required because it appears within the type `Box<<S as RaftStorage<D, R>>::Snapshot>`
note: required because it appears within the type `SnapshotState<<S as RaftStorage<D, R>>::Snapshot>`
   --> async-raft/src/core/mod.rs:413:16
    |
413 | pub(self) enum SnapshotState<S> {
    |                ^^^^^^^^^^^^^
    = note: required because it appears within the type `std::option::Option<SnapshotState<<S as RaftStorage<D, R>>::Snapshot>>`
note: required because it appears within the type `RaftCore<D, R, N, S>`
   --> async-raft/src/core/mod.rs:32:12
    |
32  | pub struct RaftCore<D: AppData, R: AppDataResponse, N: RaftNetwork<D>, S: RaftStorage<D, R>> {
    |            ^^^^^^^^
    = note: required for `&RaftCore<D, R, N, S>` to implement `std::marker::Send`
    = note: required because it captures the following types: `ResumeTy`, `bool`, `u64`, `RaftCore<D, R, N, S>`, `&mut RaftCore<D, R, N, S>`, `&S`, `Arc<S>`, `&RaftCore<D, R, N, S>`, `Pin<Box<dyn futures::Future<Output = Result<Vec<raft::Entry<D>>, anyhow::Error>> + std::marker::Send>>`, `Pin<Box<dyn futures::Future<Output = Result<Vec<raft::Entry<D>>, anyhow::Error>> + std::marker::Send>>`, `()`, `Vec<raft::Entry<D>>`, `Vec<(&u64, &D)>`, `&[(&u64, &D)]`, `&Vec<(&u64, &D)>`, `Pin<Box<dyn futures::Future<Output = Result<(), anyhow::Error>> + std::marker::Send>>`, `Pin<Box<dyn futures::Future<Output = Result<(), anyhow::Error>> + std::marker::Send>>`
note: required because it's used within this `async` block
   --> async-raft/src/core/append_entries.rs:202:5
    |
202 |     #[tracing::instrument(level = "trace", skip(self, report_metrics))]
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: required because it captures the following types: `ResumeTy`, `&mut RaftCore<D, R, N, S>`, `&mut bool`, `Span`, `[async block@async-raft/src/core/append_entries.rs:202:5: 202:72]`, `bool`, `tracing::instrument::Instrumented<[async block@async-raft/src/core/append_entries.rs:202:5: 202:72]>`, `()`
note: required because it's used within this `async fn` body
   --> async-raft/src/core/append_entries.rs:202:5
    |
202 |     #[tracing::instrument(level = "trace", skip(self, report_metrics))]
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: required because it captures the following types: `ResumeTy`, `bool`, `&mut RaftCore<D, R, N, S>`, `impl futures::Future<Output = Result<(), RaftError>>`, `()`, `&mut bool`, `impl futures::Future<Output = Result<(), RaftError>>`, `AppendEntriesRequest<D>`, `Vec<raft::Entry<D>>`, `&[raft::Entry<D>]`, `&Vec<raft::Entry<D>>`, `impl futures::Future<Output = Result<(), RaftError>>`, `RaftCore<D, R, N, S>`, `&S`, `Arc<S>`, `u64`, `Pin<Box<dyn futures::Future<Output = Result<Vec<raft::Entry<D>>, anyhow::Error>> + std::marker::Send>>`, `Pin<Box<dyn futures::Future<Output = Result<Vec<raft::Entry<D>>, anyhow::Error>> + std::marker::Send>>`, `&raft::Entry<D>`, `raft::Entry<D>`, `std::option::Option<u64>`, `Pin<Box<dyn futures::Future<Output = Result<(), anyhow::Error>> + std::marker::Send>>`, `Pin<Box<dyn futures::Future<Output = Result<(), anyhow::Error>> + std::marker::Send>>`, `Pin<Box<dyn futures::Future<Output = Result<MembershipConfig, anyhow::Error>> + std::marker::Send>>`, `Pin<Box<dyn futures::Future<Output = Result<MembershipConfig, anyhow::Error>> + std::marker::Send>>`, `Pin<Box<dyn futures::Future<Output = Result<Vec<raft::Entry<D>>, anyhow::Error>> + std::marker::Send>>`
note: required because it's used within this `async` block
   --> async-raft/src/core/append_entries.rs:10:5
    |
10  | /     #[tracing::instrument(
11  | |         level="trace", skip(self, msg),
12  | |         fields(term=msg.term, leader_id=msg.leader_id, prev_log_index=msg.prev_log_index, prev_log_term=msg.prev_log...
13  | |     )]
    | |______^
    = note: required because it captures the following types: `ResumeTy`, `&mut RaftCore<D, R, N, S>`, `AppendEntriesRequest<D>`, `Span`, `[async block@async-raft/src/core/append_entries.rs:10:5: 13:7]`, `bool`, `tracing::instrument::Instrumented<[async block@async-raft/src/core/append_entries.rs:10:5: 13:7]>`, `()`
note: required because it's used within this `async fn` body
   --> async-raft/src/core/append_entries.rs:10:5
    |
10  | /     #[tracing::instrument(
11  | |         level="trace", skip(self, msg),
12  | |         fields(term=msg.term, leader_id=msg.leader_id, prev_log_index=msg.prev_log_index, prev_log_term=msg.prev_log...
13  | |     )]
    | |______^
    = note: required because it captures the following types: `ResumeTy`, `Vec<u64>`, `&mut LeaderState<'_, D, R, N, S>`, `LeaderState<'_, D, R, N, S>`, `impl futures::Future<Output = Result<(), RaftError>>`, `impl futures::Future<Output = Result<(), RaftError>>`, `()`, `u8`, `(tokio::stream::next::Next<'_, tokio::sync::mpsc::UnboundedReceiver<RaftMsg<D, R>>>, tokio::stream::next::Next<'_, tokio::sync::mpsc::Receiver<SnapshotUpdate>>, tokio::stream::next::Next<'_, FuturesOrdered<tokio::sync::oneshot::Receiver<Result<u64, RaftError>>>>, tokio::stream::next::Next<'_, FuturesOrdered<tokio::sync::oneshot::Receiver<Result<u64, RaftError>>>>, tokio::stream::next::Next<'_, tokio::sync::mpsc::UnboundedReceiver<ReplicaEvent<<S as RaftStorage<D, R>>::Snapshot>>>)`, `[closure@/Users/ekuber/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.25/src/macros/select.rs:351:46: 351:50]`, `tokio::future::poll_fn::PollFn<[closure@/Users/ekuber/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.25/src/macros/select.rs:351:46: 351:50]>`, `LeaderState<'a, D, R, N, S>::run::{closure#0}::{closure#0}::util::Out<std::option::Option<RaftMsg<D, R>>, std::option::Option<SnapshotUpdate>, std::option::Option<Result<Result<u64, RaftError>, tokio::sync::oneshot::error::RecvError>>, std::option::Option<Result<Result<u64, RaftError>, tokio::sync::oneshot::error::RecvError>>, std::option::Option<ReplicaEvent<<S as RaftStorage<D, R>>::Snapshot>>>`, `RaftMsg<D, R>`, `AppendEntriesRequest<D>`, `tokio::sync::oneshot::Sender<Result<AppendEntriesResponse, RaftError>>`, `&mut RaftCore<D, R, N, S>`, `impl futures::Future<Output = Result<AppendEntriesResponse, RaftError>>`, `VoteRequest`, `tokio::sync::oneshot::Sender<Result<VoteResponse, RaftError>>`, `impl futures::Future<Output = Result<VoteResponse, RaftError>>`, `InstallSnapshotRequest`, `tokio::sync::oneshot::Sender<Result<InstallSnapshotResponse, RaftError>>`, `impl futures::Future<Output = Result<InstallSnapshotResponse, RaftError>>`, `tokio::sync::oneshot::Sender<Result<(), ClientReadError>>`, `impl futures::Future<Output = ()>`, `impl futures::Future<Output = ()>`, `ClientWriteRequest<D>`, `tokio::sync::oneshot::Sender<Result<ClientWriteResponse<R>, ClientWriteError<D>>>`, `impl futures::Future<Output = ()>`, `impl futures::Future<Output = ()>`, `HashSet<u64>`, `tokio::sync::oneshot::Sender<Result<(), ChangeConfigError>>`, `impl futures::Future<Output = ()>`, `impl futures::Future<Output = ()>`, `Result<u64, RaftError>`, `impl futures::Future<Output = Result<(), RaftError>>`, `impl futures::Future<Output = Result<(), RaftError>>`, `u64`, `impl futures::Future<Output = Result<(), RaftError>>`, `impl futures::Future<Output = Result<(), RaftError>>`, `ReplicaEvent<<S as RaftStorage<D, R>>::Snapshot>`, `impl futures::Future<Output = ()>`, `impl futures::Future<Output = ()>`
note: required because it's used within this `async` block
   --> async-raft/src/core/mod.rs:554:5
    |
554 |     #[tracing::instrument(level="trace", skip(self), fields(id=self.core.id, raft_state="leader"))]
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: required because it captures the following types: `ResumeTy`, `LeaderState<'_, D, R, N, S>`, `Span`, `[async block@async-raft/src/core/mod.rs:554:5: 554:100]`, `bool`, `tracing::instrument::Instrumented<[async block@async-raft/src/core/mod.rs:554:5: 554:100]>`, `()`
note: required because it's used within this `async fn` body
   --> async-raft/src/core/mod.rs:554:5
    |
554 |     #[tracing::instrument(level="trace", skip(self), fields(id=self.core.id, raft_state="leader"))]
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: required because it captures the following types: `ResumeTy`, `RaftCore<D, R, N, S>`, `&S`, `Arc<S>`, `Pin<Box<dyn futures::Future<Output = Result<InitialState, anyhow::Error>> + std::marker::Send>>`, `Pin<Box<dyn futures::Future<Output = Result<InitialState, anyhow::Error>> + std::marker::Send>>`, `()`, `InitialState`, `Pin<Box<dyn futures::Future<Output = Result<std::option::Option<CurrentSnapshotData<<S as RaftStorage<D, R>>::Snapshot>>, anyhow::Error>> + std::marker::Send>>`, `Pin<Box<dyn futures::Future<Output = Result<std::option::Option<CurrentSnapshotData<<S as RaftStorage<D, R>>::Snapshot>>, anyhow::Error>> + std::marker::Send>>`, `bool`, `State`, `&State`, `&mut RaftCore<D, R, N, S>`, `&mut RaftCore<D, R, N, S>`, `LeaderState<'_, D, R, N, S>`, `impl futures::Future<Output = Result<(), RaftError>>`, `&mut RaftCore<D, R, N, S>`, `CandidateState<'_, D, R, N, S>`, `impl futures::Future<Output = Result<(), RaftError>>`, `&mut RaftCore<D, R, N, S>`, `FollowerState<'_, D, R, N, S>`, `impl futures::Future<Output = Result<(), RaftError>>`, `&mut RaftCore<D, R, N, S>`, `NonVoterState<'_, D, R, N, S>`, `impl futures::Future<Output = Result<(), RaftError>>`
note: required because it's used within this `async` block
   --> async-raft/src/core/mod.rs:140:5
    |
140 |     #[tracing::instrument(level="trace", skip(self), fields(id=self.id, cluster=%self.config.cluster_name))]
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: required because it captures the following types: `ResumeTy`, `RaftCore<D, R, N, S>`, `Span`, `[async block@async-raft/src/core/mod.rs:140:5: 140:109]`, `bool`, `tracing::instrument::Instrumented<[async block@async-raft/src/core/mod.rs:140:5: 140:109]>`, `()`
note: required because it's used within this `async fn` body
   --> async-raft/src/core/mod.rs:140:5
    |
140 |     #[tracing::instrument(level="trace", skip(self), fields(id=self.id, cluster=%self.config.cluster_name))]
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `tokio::spawn`
   --> /Users/ekuber/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.25/src/task/spawn.rs:127:21
    |
127 |         T: Future + Send + 'static,
    |                     ^^^^ required by this bound in `spawn`
    = note: this error originates in the attribute macro `tracing::instrument` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider further restricting the associated type
    |
109 |     ) -> JoinHandle<RaftResult<()>> where <S as RaftStorage<D, R>>::Snapshot: Sync {
    |                                     ++++++++++++++++++++++++++++++++++++++++++++++

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-async-await Area: Async & Await A-diagnostics Area: Messages for errors, warnings, and lints A-typesystem Area: The type system AsyncAwait-Triaged Async-await issues that have been triaged during a working group meeting. C-enhancement Category: An issue proposing an enhancement or a PR with one. D-confusing Confusing diagnostic error that should be reworked D-verbose Too much output caused by a single piece of incorrect code E-needs-mcve Call for participation: This issue needs a Minimal Complete and Verifiable Example T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants