blob: 16c96ded9120ce08c478503a97b2ebe7967d6547 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
//! generate 2000 constants for testing
use std::{fs::write, path::PathBuf};
fn main() -> std::io::Result<()> {
let out_dir = std::env::var("OUT_DIR").expect("OUT_DIR is not defined");
let mut output = String::new();
for i in 0..2000 {
let line = format!("/// Some const A{0}\npub const A{0}: isize = 0;\n", i);
output.push_str(&*line);
};
write(&[&*out_dir, "huge_amount_of_consts.rs"].iter().collect::<PathBuf>(), output)
}
|