Fix warnings when building the build system in rust's CI

This commit is contained in:
bjorn3 2023-02-15 18:03:38 +00:00
parent 51ac38190f
commit 4435686a48
3 changed files with 8 additions and 4 deletions

View File

@ -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");
}

View File

@ -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);
@ -299,7 +299,7 @@ pub fn new(dirs: Dirs, mut target_compiler: Compiler, is_native: bool) -> Self {
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();
@ -384,7 +384,7 @@ fn run_rustc<I, S>(&self, args: I)
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

4
y.rs
View File

@ -7,6 +7,10 @@
exec ${0/.rs/.bin} $@
*/
#![warn(rust_2018_idioms)]
#![warn(unused_lifetimes)]
#![warn(unreachable_pub)]
//! The build system for cg_clif
//!
//! # Manual compilation