]> git.lizzy.rs Git - rust.git/blob - src/test/ui/threads-sendsync/send-type-inference.rs
Rollup merge of #98640 - cuviper:stable-rust-analyzer, r=Mark-Simulacrum
[rust.git] / src / test / ui / threads-sendsync / send-type-inference.rs
1 // run-pass
2 #![allow(unused_must_use)]
3 #![allow(dead_code)]
4 #![allow(unused_mut)]
5 // pretty-expanded FIXME #23616
6
7 use std::sync::mpsc::{channel, Sender};
8
9 // tests that ctrl's type gets inferred properly
10 struct Command<K, V> {
11     key: K,
12     val: V
13 }
14
15 fn cache_server<K:Send+'static,V:Send+'static>(mut tx: Sender<Sender<Command<K, V>>>) {
16     let (tx1, _rx) = channel();
17     tx.send(tx1);
18 }
19 pub fn main() { }