mirror of
https://github.com/rust-lang/rust.git
synced 2026-01-20 05:20:37 +00:00
Done with ```bash sd '//@ pretty-expanded.*\n' '' tests/ui/**/*.rs ``` and ``` sd '//@pretty-expanded.*\n' '' tests/ui/**/*.rs ```
11 lines
199 B
Rust
11 lines
199 B
Rust
//@ run-pass
|
|
|
|
use std::collections::HashMap;
|
|
|
|
pub fn main() {
|
|
let x: Box<_>;
|
|
let mut buggy_map: HashMap<usize, &usize> = HashMap::new();
|
|
x = Box::new(1);
|
|
buggy_map.insert(42, &*x);
|
|
}
|