about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2023-02-15 18:03:38 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2023-04-13 13:17:01 +0000
commit4435686a486e0228df34bf9ff739c1e27c836f22 (patch)
treeab8bb39e1c50b0d4e745f740b70a590fdf3f2274
parent51ac38190f8afa063f2e69d19d78b50b48feac75 (diff)
downloadrust-4435686a486e0228df34bf9ff739c1e27c836f22.tar.gz
rust-4435686a486e0228df34bf9ff739c1e27c836f22.zip
Fix warnings when building the build system in rust's CI
-rw-r--r--build_system/mod.rs2
-rw-r--r--build_system/tests.rs6
-rwxr-xr-xy.rs4
3 files changed, 8 insertions, 4 deletions
diff --git a/build_system/mod.rs b/build_system/mod.rs
index 8a53acdf7e3..e4ed9be23b7 100644
--- a/build_system/mod.rs
+++ b/build_system/mod.rs
@@ -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");
     }
diff --git a/build_system/tests.rs b/build_system/tests.rs
index e2a6fa91eb3..a9a192242cf 100644
--- a/build_system/tests.rs
+++ b/build_system/tests.rs
@@ -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 @@ 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();
@@ -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
diff --git a/y.rs b/y.rs
index 02e1e21ade1..a68a10500f5 100755
--- a/y.rs
+++ b/y.rs
@@ -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