2018-08-30 14:18:55 +02:00
|
|
|
//@ run-pass
|
2015-03-22 13:13:15 -07:00
|
|
|
|
2014-05-29 19:03:06 -07:00
|
|
|
use std::collections::HashMap;
|
2012-12-06 18:32:13 -08:00
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {
|
2015-02-17 21:41:32 +01:00
|
|
|
let x: Box<_>;
|
2015-03-25 17:06:52 -07:00
|
|
|
let mut buggy_map: HashMap<usize, &usize> = HashMap::new();
|
2022-07-07 04:36:10 +02:00
|
|
|
x = Box::new(1);
|
2013-01-22 17:20:08 -08:00
|
|
|
buggy_map.insert(42, &*x);
|
2012-12-06 18:32:13 -08:00
|
|
|
}
|