blob: e2ba5a9417138abf8a4de9ef6a6eea6b0ce38dbe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// Test that we suggest specifying the generic argument of `channel`
// instead of the return type of that function, which is a lot more
// complex.
use std::sync::mpsc::channel;
fn no_tuple() {
let _data =
channel(); //~ ERROR type annotations needed
}
fn tuple() {
let (_sender, _receiver) =
channel(); //~ ERROR type annotations needed
}
fn main() {
no_tuple();
tuple();
}
|