blob: 9a56a399b9b563e5107f7a580cafd98c40d68848 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
struct Qux(i32);
fn bad() {
let mut map = std::collections::HashMap::new();
map.insert(('a', 'b'), ('c', 'd'));
for ((_, _), (&mut c, _)) in &mut map {
//~^ ERROR mismatched types
if c == 'e' {}
}
}
fn bad2() {
for Some(Qux(_)) | None in [Some(""), None] {
//~^ ERROR mismatched types
todo!();
}
}
fn main() {}
|