mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-24 09:50:28 +00:00
19 lines
415 B
Rust
19 lines
415 B
Rust
//@ check-pass
|
|
|
|
use std::collections::HashMap;
|
|
use std::sync::Mutex;
|
|
|
|
fn i_used_to_be_able_to(foo: &Mutex<HashMap<usize, usize>>) -> Vec<(usize, usize)> {
|
|
let mut foo = foo.lock().unwrap();
|
|
|
|
foo.drain().collect()
|
|
}
|
|
|
|
fn but_after_nightly_update_now_i_gotta(foo: &Mutex<HashMap<usize, usize>>) -> Vec<(usize, usize)> {
|
|
let mut foo = foo.lock().unwrap();
|
|
|
|
return foo.drain().collect();
|
|
}
|
|
|
|
fn main() {}
|