#![allow(unreachable_code)]
fn main() {
println!("{:?}", {
let () = std::collections::HashMap::new().entry("foo");
});
}
/* ~~~~=== stderr ===~~~~
Compiling playground v0.0.1 (/playground)
error[E0308]: mismatched types
--> src/main.rs:6:13
|
6 | let () = std::collections::HashMap::new().entry("foo");
| ^^ expected enum `std::collections::hash_map::Entry`, found ()
|
= note: expected type `std::collections::hash_map::Entry<'_, &str, _>`
found type `()`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.
error: Could not compile `playground`.
To learn more, run the command again with --verbose.
*/
/* ~~~~=== stdout ===~~~~
*/
fn main() {
println!("{:?}", {
let () = std::collections::HashMap::new().entry("foo");
});
}
/* ~~~~=== stderr ===~~~~
Compiling playground v0.0.1 (/playground)
error[E0308]: mismatched types
--> src/main.rs:6:13
|
6 | let () = std::collections::HashMap::new().entry("foo");
| ^^ expected enum `std::collections::hash_map::Entry`, found ()
|
= note: expected type `std::collections::hash_map::Entry<'_, &str, _>`
found type `()`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.
error: Could not compile `playground`.
To learn more, run the command again with --verbose.
*/
/* ~~~~=== stdout ===~~~~
*/