Skip to content

Commit 45f0013

Browse files
committed
bootstrap: reorganize lib.rs module decl and import/re-exports.
Make it easier to tell which import/re-export comes from what.
1 parent c55e407 commit 45f0013

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

src/bootstrap/src/lib.rs

+11-14
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
//! More documentation can be found in each respective module below, and you can
1717
//! also check out the `src/bootstrap/README.md` file for more information.
1818
19+
mod core;
20+
mod utils;
21+
1922
use std::cell::{Cell, RefCell};
2023
use std::collections::{BTreeSet, HashMap, HashSet};
2124
use std::fmt::Display;
@@ -30,26 +33,20 @@ use build_helper::ci::gha;
3033
use build_helper::exit;
3134
use sha2::digest::Digest;
3235
use termcolor::{ColorChoice, StandardStream, WriteColor};
33-
use utils::channel::GitInfo;
34-
use utils::helpers::hex_encode;
3536

37+
pub use self::core::builder::PathSet;
38+
pub use self::core::config::Config;
39+
pub use self::core::config::flags::{Flags, Subcommand};
3640
use crate::core::builder;
3741
use crate::core::builder::{Builder, Kind};
3842
use crate::core::config::{DryRun, LldMode, LlvmLibunwind, Target, TargetSelection, flags};
43+
pub use crate::utils::change_tracker::{
44+
CONFIG_CHANGE_HISTORY, find_recent_config_change_ids, human_readable_changes,
45+
};
46+
use crate::utils::channel::GitInfo;
3947
use crate::utils::exec::{BehaviorOnFailure, BootstrapCommand, CommandOutput, OutputMode, command};
4048
use crate::utils::helpers::{
41-
self, dir_is_empty, exe, libdir, mtime, output, set_file_times, symlink_dir,
42-
};
43-
44-
mod core;
45-
mod utils;
46-
47-
pub use core::builder::PathSet;
48-
pub use core::config::Config;
49-
pub use core::config::flags::{Flags, Subcommand};
50-
51-
pub use utils::change_tracker::{
52-
CONFIG_CHANGE_HISTORY, find_recent_config_change_ids, human_readable_changes,
49+
self, dir_is_empty, exe, hex_encode, libdir, mtime, output, set_file_times, symlink_dir,
5350
};
5451

5552
const LLVM_TOOLS: &[&str] = &[

0 commit comments

Comments
 (0)