Open GopherJ opened 2 months ago
Reproduce steps:
cae2b90657430db061c617aab5af629c369ceb41
build_trace_commitment_sync::<E, Felt, H>(main_trace, domain)
by build_trace_commitment(main_trace, domain, webgpu_hash_fn).await
cargo check --no-default-features --target wasm32-unknown-unknown --features webgpu
in prover directoryExpanded code:
#[allow(
clippy::async_yields_async,
clippy::diverging_sub_expression,
clippy::let_unit_value,
clippy::no_effect_underscore_binding,
clippy::shadow_same,
clippy::type_complexity,
clippy::type_repetition_in_bounds,
clippy::used_underscore_binding
)]
fn new_trace_lde<'life0, 'life1, 'life2, 'life3, 'async_trait, E>(
&'life0 self,
trace_info: &'life1 TraceInfo,
main_trace: &'life2 ColMatrix<Felt>,
domain: &'life3 StarkDomain<Felt>,
) -> ::core::pin::Pin<
Box<
dyn ::core::future::Future<
Output = (Self::TraceLde<E>, TracePolyTable<E>),
> + ::core::marker::Send + 'async_trait,
>,
>
where
E: 'async_trait + FieldElement<BaseField = Felt>,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
{
Box::pin(async move {
if let ::core::option::Option::Some(__ret) = ::core::option::Option::None::<
(Self::TraceLde<E>, TracePolyTable<E>),
> {
#[allow(unreachable_code)] return __ret;
}
let __self = self;
let __ret: (Self::TraceLde<E>, TracePolyTable<E>) = {
WebGPUTraceLde::new(
trace_info,
main_trace,
domain,
__self.webgpu_hash_fn,
)
.await
};
#[allow(unreachable_code)] __ret
})
I tried this code:
I expected to see this happen: No error
Instead, this happened:
Meta
rustc --version --verbose
:``` error: implementation of `FnOnce` is not general enough --> prover/src/gpu/webgpu/mod.rs:177:49 | 177 | ) -> (Self::TraceLde, TracePolyTable) {
| _________________________________________________^
178 | | WebGPUTraceLde::new(trace_info, main_trace, domain, self.webgpu_hash_fn).await
179 | | }
| |_____^ implementation of `FnOnce` is not general enough
|
= note: closure with signature `fn(&'0 [Felt]) -> Vec` must implement `FnOnce<(&'1 [Felt],)>`, for any two lifetimes `'0` and `'1`...
= note: ...but it actually implements `FnOnce<(&[Felt],)>`
```