2024-06-06 20:47:00 +02:00
|
|
|
use std::iter;
|
2024-03-23 15:48:44 +01:00
|
|
|
use std::path::Path;
|
|
|
|
|
2024-07-29 08:13:50 +10:00
|
|
|
use run_make_support::{rfs, rustdoc};
|
|
|
|
|
2024-03-23 15:48:44 +01:00
|
|
|
fn generate_a_lot_of_cfgs(path: &Path) {
|
|
|
|
let content = iter::repeat("--cfg=a\n").take(100_000).collect::<String>();
|
2024-07-17 12:42:06 +00:00
|
|
|
rfs::write(path, content.as_bytes());
|
2024-03-23 15:48:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2024-06-06 21:34:34 +02:00
|
|
|
let arg_file = Path::new("args");
|
2024-03-23 15:48:44 +01:00
|
|
|
generate_a_lot_of_cfgs(&arg_file);
|
|
|
|
|
2024-06-06 21:34:34 +02:00
|
|
|
rustdoc().input("foo.rs").arg_file(&arg_file).arg("--test").run();
|
2024-03-23 15:48:44 +01:00
|
|
|
}
|