From 170baa2f782edfc01d17d7c2d98151dad71be79f Mon Sep 17 00:00:00 2001 From: Alex Saveau Date: Fri, 2 Feb 2024 10:10:02 -0800 Subject: [PATCH] Fix lints Signed-off-by: Alex Saveau --- llvm-plugin/build.rs | 2 +- llvm-plugin/src/analysis.rs | 2 +- llvm-plugin/src/pass_manager.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm-plugin/build.rs b/llvm-plugin/build.rs index 0f6b776..49ac5bb 100644 --- a/llvm-plugin/build.rs +++ b/llvm-plugin/build.rs @@ -98,7 +98,7 @@ mod llvm_sys { fn locate_llvm_config() -> Option { let prefix = env::var_os(&*ENV_LLVM_PREFIX) .map(|p| PathBuf::from(p).join("bin")) - .unwrap_or_else(PathBuf::new); + .unwrap_or_default(); for binary_name in llvm_config_binary_names() { let binary_name = prefix.join(binary_name); match llvm_version(&binary_name) { diff --git a/llvm-plugin/src/analysis.rs b/llvm-plugin/src/analysis.rs index 1521104..e439479 100644 --- a/llvm-plugin/src/analysis.rs +++ b/llvm-plugin/src/analysis.rs @@ -125,7 +125,7 @@ impl FunctionAnalysisManager { } Box::into_raw(pass); - #[allow(clippy::forget_copy)] + #[allow(forgetting_copy_types)] std::mem::forget(function); } diff --git a/llvm-plugin/src/pass_manager.rs b/llvm-plugin/src/pass_manager.rs index d1ed688..a6adc7f 100644 --- a/llvm-plugin/src/pass_manager.rs +++ b/llvm-plugin/src/pass_manager.rs @@ -111,7 +111,7 @@ impl FunctionPassManager { let preserve = pass.run_pass(&mut function, &manager); Box::into_raw(pass); - #[allow(clippy::forget_copy)] + #[allow(forgetting_copy_types)] std::mem::forget(function); preserve