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`
This commit is contained in:
Matthias Krüger 2024-03-20 05:51:22 +01:00 committed by GitHub
commit 4f3050b85a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 107 additions and 37 deletions

View file

@ -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(