2015-05-25 18:45:15 -05:00
|
|
|
#![feature(plugin)]
|
2016-03-07 12:08:46 -06:00
|
|
|
#![plugin(clippy)]
|
2015-05-25 18:45:15 -05:00
|
|
|
|
2015-05-26 06:52:40 -05:00
|
|
|
#[macro_use]
|
|
|
|
extern crate lazy_static;
|
2015-05-25 18:45:15 -05:00
|
|
|
|
2015-05-26 06:52:40 -05:00
|
|
|
use std::collections::HashMap;
|
|
|
|
|
|
|
|
#[deny(mut_mut)]
|
|
|
|
#[allow(unused_variables, unused_mut)]
|
2016-03-07 12:08:46 -06:00
|
|
|
fn main() {
|
2015-08-11 13:22:20 -05:00
|
|
|
lazy_static! {
|
|
|
|
static ref MUT_MAP : HashMap<usize, &'static str> = {
|
|
|
|
let mut m = HashMap::new();
|
|
|
|
let mut zero = &mut &mut "zero";
|
|
|
|
m.insert(0, "zero");
|
|
|
|
m
|
|
|
|
};
|
|
|
|
static ref MUT_COUNT : usize = MUT_MAP.len();
|
|
|
|
}
|
|
|
|
assert!(*MUT_COUNT == 1);
|
2015-05-26 06:52:40 -05:00
|
|
|
}
|