2 // revisions: normal drop_tracking
3 // [drop_tracking]compile-flags:-Zdrop-tracking
4 // #70935: Check if we do not emit snippet
5 // with newlines which lead complex diagnostics.
7 use std::future::Future;
9 async fn baz<T>(_c: impl FnMut() -> T) where T: Future<Output=()> {
12 fn foo(tx: std::sync::mpsc::Sender<i32>) -> impl Future + Send {
13 //[normal]~^ ERROR future cannot be sent between threads safely
14 //[drop_tracking]~^^ ERROR `Sender<i32>` cannot be shared between threads
22 fn bar(_s: impl Future + Send) {
26 let (tx, _rx) = std::sync::mpsc::channel();