Skip to content

Commit 4435686

Browse files
committed
Fix warnings when building the build system in rust's CI
1 parent 51ac381 commit 4435686

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

build_system/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub(crate) enum SysrootKind {
4343
Llvm,
4444
}
4545

46-
pub fn main() {
46+
pub(crate) fn main() {
4747
if env::var("RUST_BACKTRACE").is_err() {
4848
env::set_var("RUST_BACKTRACE", "1");
4949
}

build_system/tests.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ struct TestRunner {
277277
}
278278

279279
impl TestRunner {
280-
pub fn new(dirs: Dirs, mut target_compiler: Compiler, is_native: bool) -> Self {
280+
fn new(dirs: Dirs, mut target_compiler: Compiler, is_native: bool) -> Self {
281281
if let Ok(rustflags) = env::var("RUSTFLAGS") {
282282
target_compiler.rustflags.push(' ');
283283
target_compiler.rustflags.push_str(&rustflags);
@@ -299,7 +299,7 @@ impl TestRunner {
299299
Self { is_native, jit_supported, dirs, target_compiler }
300300
}
301301

302-
pub fn run_testsuite(&self, tests: &[TestCase]) {
302+
fn run_testsuite(&self, tests: &[TestCase]) {
303303
for TestCase { config, cmd } in tests {
304304
let (tag, testname) = config.split_once('.').unwrap();
305305
let tag = tag.to_uppercase();
@@ -384,7 +384,7 @@ impl TestRunner {
384384
spawn_and_wait(self.rustc_command(args));
385385
}
386386

387-
fn run_out_command<'a>(&self, name: &str, args: &[&str]) {
387+
fn run_out_command(&self, name: &str, args: &[&str]) {
388388
let mut full_cmd = vec![];
389389

390390
// Prepend the RUN_WRAPPER's

y.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ rustc $0 -o ${0/.rs/.bin} -Cdebuginfo=1 --edition 2021
77
exec ${0/.rs/.bin} $@
88
*/
99

10+
#![warn(rust_2018_idioms)]
11+
#![warn(unused_lifetimes)]
12+
#![warn(unreachable_pub)]
13+
1014
//! The build system for cg_clif
1115
//!
1216
//! # Manual compilation

0 commit comments

Comments
 (0)