diff options
author | David Tolnay <dtolnay@gmail.com> | 2024-03-06 00:02:40 -0800 |
---|---|---|
committer | David Tolnay <dtolnay@gmail.com> | 2024-03-06 00:02:45 -0800 |
commit | afb4d750e0d9351025da53e5f569e9034f9b55c3 (patch) | |
tree | 54aa870a7e7be327edd7a1d4f01360fd99f71d7d | |
parent | fe8fdcad16068c94be86b414bec9be179771c769 (diff) | |
download | cxx-afb4d750e0d9351025da53e5f569e9034f9b55c3.tar.gz |
Ignore let_and_return clippy lint
warning: returning the result of a `let` binding from a block
--> flags/src/impl.rs:14:5
|
3 | let mut flag = "c++11";
| ----------------------- unnecessary `let` binding
...
14 | flag
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
= note: `-W clippy::let-and-return` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::let_and_return)]`
help: return the expression directly
|
3 ~
4 |
...
13 |
14 ~ ("c++11") as _
|
-rw-r--r-- | flags/src/lib.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/flags/src/lib.rs b/flags/src/lib.rs index 55172b21..899facd4 100644 --- a/flags/src/lib.rs +++ b/flags/src/lib.rs @@ -1,6 +1,8 @@ //! This crate is an implementation detail of the `cxx` and `cxx-build` crates, //! and does not expose any public API. +#![allow(clippy::let_and_return)] + mod r#impl; #[doc(hidden)] |