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 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();