mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
21 lines
363 B
Rust
21 lines
363 B
Rust
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() {}
|