Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d1e3dc6

Browse files
committedOct 11, 2023
Remove unneeded pubs.
1 parent 88800fd commit d1e3dc6

File tree

1 file changed

+7
-7
lines changed
  • compiler/rustc_driver_impl/src

1 file changed

+7
-7
lines changed
 

‎compiler/rustc_driver_impl/src/lib.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ pub enum Compilation {
545545
}
546546

547547
impl Compilation {
548-
pub fn and_then<F: FnOnce() -> Compilation>(self, next: F) -> Compilation {
548+
fn and_then<F: FnOnce() -> Compilation>(self, next: F) -> Compilation {
549549
match self {
550550
Compilation::Stop => Compilation::Stop,
551551
Compilation::Continue => next(),
@@ -657,7 +657,7 @@ fn show_md_content_with_pager(content: &str, color: ColorConfig) {
657657
}
658658
}
659659

660-
pub fn try_process_rlink(sess: &Session, compiler: &interface::Compiler) -> Compilation {
660+
fn try_process_rlink(sess: &Session, compiler: &interface::Compiler) -> Compilation {
661661
if sess.opts.unstable_opts.link_only {
662662
if let Input::File(file) = &sess.io.input {
663663
let outputs = compiler.build_output_filenames(sess, &[]);
@@ -698,7 +698,7 @@ pub fn try_process_rlink(sess: &Session, compiler: &interface::Compiler) -> Comp
698698
}
699699
}
700700

701-
pub fn list_metadata(
701+
fn list_metadata(
702702
handler: &EarlyErrorHandler,
703703
sess: &Session,
704704
metadata_loader: &dyn MetadataLoader,
@@ -1184,7 +1184,7 @@ fn print_flag_list<T>(
11841184
///
11851185
/// So with all that in mind, the comments below have some more detail about the
11861186
/// contortions done here to get things to work out correctly.
1187-
pub fn handle_options(handler: &EarlyErrorHandler, args: &[String]) -> Option<getopts::Matches> {
1187+
fn handle_options(handler: &EarlyErrorHandler, args: &[String]) -> Option<getopts::Matches> {
11881188
if args.is_empty() {
11891189
// user did not write `-v` nor `-Z unstable-options`, so do not
11901190
// include that extra information.
@@ -1283,9 +1283,9 @@ pub fn catch_with_exit_code(f: impl FnOnce() -> interface::Result<()>) -> i32 {
12831283
}
12841284
}
12851285

1286-
pub static ICE_PATH: OnceLock<Option<PathBuf>> = OnceLock::new();
1286+
static ICE_PATH: OnceLock<Option<PathBuf>> = OnceLock::new();
12871287

1288-
pub fn ice_path() -> &'static Option<PathBuf> {
1288+
fn ice_path() -> &'static Option<PathBuf> {
12891289
ICE_PATH.get_or_init(|| {
12901290
if !rustc_feature::UnstableFeatures::from_environment(None).is_nightly_build() {
12911291
return None;
@@ -1394,7 +1394,7 @@ pub fn install_ice_hook(bug_report_url: &'static str, extra_info: fn(&Handler))
13941394
///
13951395
/// When `install_ice_hook` is called, this function will be called as the panic
13961396
/// hook.
1397-
pub fn report_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str, extra_info: fn(&Handler)) {
1397+
fn report_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str, extra_info: fn(&Handler)) {
13981398
let fallback_bundle =
13991399
rustc_errors::fallback_fluent_bundle(crate::DEFAULT_LOCALE_RESOURCES.to_vec(), false);
14001400
let emitter = Box::new(rustc_errors::emitter::EmitterWriter::stderr(

0 commit comments

Comments
 (0)
Please sign in to comment.