Skip to content

Commit

Permalink
Fix warnings when building the build system in rust's CI
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Apr 13, 2023
1 parent 51ac381 commit 4435686
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build_system/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub(crate) enum SysrootKind {
Llvm,
}

pub fn main() {
pub(crate) fn main() {
if env::var("RUST_BACKTRACE").is_err() {
env::set_var("RUST_BACKTRACE", "1");
}
Expand Down
6 changes: 3 additions & 3 deletions build_system/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ struct TestRunner {
}

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

pub fn run_testsuite(&self, tests: &[TestCase]) {
fn run_testsuite(&self, tests: &[TestCase]) {
for TestCase { config, cmd } in tests {
let (tag, testname) = config.split_once('.').unwrap();
let tag = tag.to_uppercase();
Expand Down Expand Up @@ -384,7 +384,7 @@ impl TestRunner {
spawn_and_wait(self.rustc_command(args));
}

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

// Prepend the RUN_WRAPPER's
Expand Down
4 changes: 4 additions & 0 deletions y.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ rustc $0 -o ${0/.rs/.bin} -Cdebuginfo=1 --edition 2021
exec ${0/.rs/.bin} $@
*/

#![warn(rust_2018_idioms)]
#![warn(unused_lifetimes)]
#![warn(unreachable_pub)]

//! The build system for cg_clif
//!
//! # Manual compilation
Expand Down

0 comments on commit 4435686

Please sign in to comment.