如何实现这种函数签名 `fn spmc_test_scope(make_worker: impl for<'a> Fn(i32, &'a Mutex>) -> impl FnOnce() + Send + 'a)`

📝

内容提要

我想要写的函数签名 虽然不符合语法,但最接近我的本意 fn spmc_test_scope( make_worker: impl for<'a> Fn(i32, &'a Mutex<Vec<i32>>) -> impl FnOnce() + Send + 'a) 我想要跑的代码 use std::sync::Mutex; use std::thread; use...

🏷️

标签

➡️

继续阅读