1 #![warn(clippy::future_not_send)]
7 async fn private_future(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {
11 pub async fn public_future(rc: Rc<[u8]>) {
15 pub async fn public_send(arc: Arc<[u8]>) -> bool {
19 async fn private_future2(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {
23 pub async fn public_future2(rc: Rc<[u8]>) {}
25 pub async fn public_send2(arc: Arc<[u8]>) -> bool {
34 async fn private_future(&self) -> usize {
39 pub async fn public_future(&self) {
40 self.private_future().await;
43 #[allow(clippy::manual_async_fn)]
44 pub fn public_send(&self) -> impl std::future::Future<Output = bool> {
49 async fn generic_future<T>(t: T) -> T
58 async fn generic_future_send<T>(t: T)
65 async fn unclear_future<T>(t: T) {}
68 let rc = Rc::new([1, 2, 3]);
69 private_future(rc.clone(), &Cell::new(42));
70 public_future(rc.clone());
71 let arc = Arc::new([4, 5, 6]);
74 generic_future_send(42);
76 let dummy = Dummy { rc };
77 dummy.public_future();