about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-03-20 05:51:22 +0100
committerGitHub <noreply@github.com>2024-03-20 05:51:22 +0100
commit4f3050b85a315eb11344d483466530805597c46b (patch)
tree2167b4eaa822e883d7ea34f59534a2984ff4c8a3 /compiler/rustc_codegen_llvm/src
parentb7dcabe55e3b915ba9488dc374f752404c2c8945 (diff)
parent81d7d7aabd5cdfb1e574a7ebae0b884e3aad8dea (diff)
downloadrust-4f3050b85a315eb11344d483466530805597c46b.tar.gz
rust-4f3050b85a315eb11344d483466530805597c46b.zip
Rollup merge of #121543 - onur-ozkan:clippy-args, r=oli-obk
various clippy fixes

We need to keep the order of the given clippy lint rules before passing them.
Since clap doesn't offer any useful interface for this purpose out of the box,
we have to handle it manually.

Additionally, this PR makes `-D` rules work as expected. Previously, lint rules were limited to `-W`. By enabling `-D`, clippy began to complain numerous lines in the tree, all of which have been resolved in this PR as well.

Fixes #121481
cc `@matthiaskrgr`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/context.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs
index c3f17563b0a..649ff9df2cc 100644
--- a/compiler/rustc_codegen_llvm/src/context.rs
+++ b/compiler/rustc_codegen_llvm/src/context.rs
@@ -315,6 +315,7 @@ pub unsafe fn create_module<'ll>(
     //
     // On the wasm targets it will get hooked up to the "producer" sections
     // `processed-by` information.
+    #[allow(clippy::option_env_unwrap)]
     let rustc_producer =
         format!("rustc version {}", option_env!("CFG_VERSION").expect("CFG_VERSION"));
     let name_metadata = llvm::LLVMMDStringInContext(