Skip to content

Commit 7ea6e71

Browse files
committed
Remove some dead code
1 parent ad6f98c commit 7ea6e71

File tree

4 files changed

+1
-31
lines changed

4 files changed

+1
-31
lines changed

src/bootstrap/builder.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,6 @@ pub enum Kind {
351351
Check,
352352
Clippy,
353353
Fix,
354-
Format,
355354
Test,
356355
Bench,
357356
Dist,
@@ -399,7 +398,7 @@ impl<'a> Builder<'a> {
399398
native::Lld,
400399
native::CrtBeginEnd
401400
),
402-
Kind::Check | Kind::Clippy { .. } | Kind::Fix | Kind::Format => describe!(
401+
Kind::Check | Kind::Clippy { .. } | Kind::Fix => describe!(
403402
check::Std,
404403
check::Rustc,
405404
check::Rustdoc,

src/bootstrap/config.rs

-4
Original file line numberDiff line numberDiff line change
@@ -1149,10 +1149,6 @@ impl Config {
11491149
self.verbose > 0
11501150
}
11511151

1152-
pub fn very_verbose(&self) -> bool {
1153-
self.verbose > 1
1154-
}
1155-
11561152
pub fn sanitizers_enabled(&self, target: TargetSelection) -> bool {
11571153
self.target_config.get(&target).map(|t| t.sanitizers).flatten().unwrap_or(self.sanitizers)
11581154
}

src/bootstrap/lib.rs

-5
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ use std::fs::{self, File, OpenOptions};
110110
use std::io::{Read, Seek, SeekFrom, Write};
111111
use std::path::{Path, PathBuf};
112112
use std::process::{self, Command};
113-
use std::slice;
114113
use std::str;
115114

116115
#[cfg(unix)]
@@ -472,10 +471,6 @@ impl Build {
472471
build
473472
}
474473

475-
pub fn build_triple(&self) -> &[Interned<String>] {
476-
slice::from_ref(&self.build.triple)
477-
}
478-
479474
// modified from `check_submodule` and `update_submodule` in bootstrap.py
480475
/// Given a path to the directory of a submodule, update it.
481476
///

src/bootstrap/util.rs

-20
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ use build_helper::t;
1616
use crate::builder::Builder;
1717
use crate::config::{Config, TargetSelection};
1818

19-
/// Returns the `name` as the filename of a static library for `target`.
20-
pub fn staticlib(name: &str, target: TargetSelection) -> String {
21-
if target.contains("windows") { format!("{}.lib", name) } else { format!("lib{}.a", name) }
22-
}
23-
2419
/// Given an executable called `name`, return the filename for the
2520
/// executable for a particular target.
2621
pub fn exe(name: &str, target: TargetSelection) -> String {
@@ -81,21 +76,6 @@ fn link_lib_path() -> Vec<PathBuf> {
8176
env::split_paths(&var).collect()
8277
}
8378

84-
/// `push` all components to `buf`. On windows, append `.exe` to the last component.
85-
pub fn push_exe_path(mut buf: PathBuf, components: &[&str]) -> PathBuf {
86-
let (&file, components) = components.split_last().expect("at least one component required");
87-
let mut file = file.to_owned();
88-
89-
if cfg!(windows) {
90-
file.push_str(".exe");
91-
}
92-
93-
buf.extend(components);
94-
buf.push(file);
95-
96-
buf
97-
}
98-
9979
pub struct TimeIt(bool, Instant);
10080

10181
/// Returns an RAII structure that prints out how long it took to drop.

0 commit comments

Comments
 (0)