2 #![warn(clippy::future_not_send)]
8 async fn private_future(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {
12 pub async fn public_future(rc: Rc<[u8]>) {
16 pub async fn public_send(arc: Arc<[u8]>) -> bool {
20 async fn private_future2(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {
24 pub async fn public_future2(rc: Rc<[u8]>) {}
26 pub async fn public_send2(arc: Arc<[u8]>) -> bool {
35 async fn private_future(&self) -> usize {
40 pub async fn public_future(&self) {
41 self.private_future().await;
44 #[allow(clippy::manual_async_fn)]
45 pub fn public_send(&self) -> impl std::future::Future<Output = bool> {
50 async fn generic_future<T>(t: T) -> T
59 async fn generic_future_send<T>(t: T)
66 async fn unclear_future<T>(t: T) {}
69 let rc = Rc::new([1, 2, 3]);
70 private_future(rc.clone(), &Cell::new(42));
71 public_future(rc.clone());
72 let arc = Arc::new([4, 5, 6]);
75 generic_future_send(42);
77 let dummy = Dummy { rc };
78 dummy.public_future();