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