Skip to content

Commit 2017344

Browse files
committed
Remove usage of function const promotion in the build system
1 parent 726b736 commit 2017344

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

build_system/abi_cafe.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ static ABI_CAFE_REPO: GitRepo = GitRepo::github(
1111
"abi-cafe",
1212
);
1313

14-
static ABI_CAFE: CargoProject = CargoProject::new(&ABI_CAFE_REPO.source_dir(), "abi_cafe_target");
14+
static ABI_CAFE: CargoProject = CargoProject::new(ABI_CAFE_REPO.source_dir(), "abi_cafe_target");
1515

1616
pub(crate) fn run(
1717
sysroot_kind: SysrootKind,

build_system/build_backend.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::rustc_info::get_file_name;
66
use crate::shared_utils::{rustflags_from_env, rustflags_to_cmd_env};
77
use crate::utils::{CargoProject, Compiler, LogGroup};
88

9-
static CG_CLIF: CargoProject = CargoProject::new(&RelPath::source("."), "cg_clif");
9+
static CG_CLIF: CargoProject = CargoProject::new(RelPath::source("."), "cg_clif");
1010

1111
pub(crate) fn build_backend(
1212
dirs: &Dirs,

build_system/build_sysroot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ impl SysrootTarget {
140140

141141
static STDLIB_SRC: RelPath = RelPath::build("stdlib");
142142
static STANDARD_LIBRARY: CargoProject =
143-
CargoProject::new(&RelPath::build("stdlib/library/sysroot"), "stdlib_target");
143+
CargoProject::new(RelPath::build("stdlib/library/sysroot"), "stdlib_target");
144144

145145
fn build_sysroot_for_triple(
146146
dirs: &Dirs,

build_system/tests.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ pub(crate) static RAND_REPO: GitRepo = GitRepo::github(
129129
"rand",
130130
);
131131

132-
static RAND: CargoProject = CargoProject::new(&RAND_REPO.source_dir(), "rand_target");
132+
static RAND: CargoProject = CargoProject::new(RAND_REPO.source_dir(), "rand_target");
133133

134134
pub(crate) static REGEX_REPO: GitRepo = GitRepo::github(
135135
"rust-lang",
@@ -139,15 +139,15 @@ pub(crate) static REGEX_REPO: GitRepo = GitRepo::github(
139139
"regex",
140140
);
141141

142-
static REGEX: CargoProject = CargoProject::new(&REGEX_REPO.source_dir(), "regex_target");
142+
static REGEX: CargoProject = CargoProject::new(REGEX_REPO.source_dir(), "regex_target");
143143

144144
static PORTABLE_SIMD_SRC: RelPath = RelPath::build("portable-simd");
145145

146-
static PORTABLE_SIMD: CargoProject = CargoProject::new(&PORTABLE_SIMD_SRC, "portable-simd_target");
146+
static PORTABLE_SIMD: CargoProject = CargoProject::new(PORTABLE_SIMD_SRC, "portable-simd_target");
147147

148148
static SYSROOT_TESTS_SRC: RelPath = RelPath::build("sysroot_tests");
149149

150-
static SYSROOT_TESTS: CargoProject = CargoProject::new(&SYSROOT_TESTS_SRC, "sysroot_tests_target");
150+
static SYSROOT_TESTS: CargoProject = CargoProject::new(SYSROOT_TESTS_SRC, "sysroot_tests_target");
151151

152152
const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[
153153
TestCase::custom("test.rust-random/rand", &|runner| {

build_system/utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ impl Compiler {
7575
}
7676

7777
pub(crate) struct CargoProject {
78-
source: &'static RelPath,
78+
source: RelPath,
7979
target: &'static str,
8080
}
8181

8282
impl CargoProject {
83-
pub(crate) const fn new(path: &'static RelPath, target: &'static str) -> CargoProject {
83+
pub(crate) const fn new(path: RelPath, target: &'static str) -> CargoProject {
8484
CargoProject { source: path, target }
8585
}
8686

0 commit comments

Comments
 (0)