Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Saveau <[email protected]>
  • Loading branch information
SUPERCILEX authored and jamesmth committed Feb 2, 2024
1 parent de1975b commit 170baa2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion llvm-plugin/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ mod llvm_sys {
fn locate_llvm_config() -> Option<PathBuf> {
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) {
Expand Down
2 changes: 1 addition & 1 deletion llvm-plugin/src/analysis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ impl FunctionAnalysisManager {
}

Box::into_raw(pass);
#[allow(clippy::forget_copy)]
#[allow(forgetting_copy_types)]
std::mem::forget(function);
}

Expand Down
2 changes: 1 addition & 1 deletion llvm-plugin/src/pass_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 170baa2

Please sign in to comment.