Skip to content

Commit 06a93f1

Browse files
committed
Fix incomplete application of Clippy configuration in x helper script.
1 parent 2df6cba commit 06a93f1

File tree

2 files changed

+23
-14
lines changed

2 files changed

+23
-14
lines changed

benches/array.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ fn from_vec3_large(bencher: &mut Bencher) {
185185
from_vec3(bencher, 2_usize.pow(5));
186186
}
187187

188-
fn iter_with_gil(bencher: &mut Bencher, mut f: impl FnMut(Python)) {
188+
fn iter_with_gil(bencher: &mut Bencher, mut f: impl FnMut(Python<'_>)) {
189189
Python::with_gil(|py| {
190190
bencher.iter(|| {
191191
let pool = unsafe { py.new_pool() };

x.py

+22-13
Original file line numberDiff line numberDiff line change
@@ -29,31 +29,40 @@ def gen_examples(manifest):
2929
yield dir_ / manifest
3030

3131

32+
LINT_CONFIG = (
33+
"--deny",
34+
"warnings",
35+
# We usually want to make the GIL lifetime explicit.
36+
"--deny",
37+
"elided-lifetimes-in-paths",
38+
"--allow",
39+
"clippy::needless-lifetimes",
40+
)
41+
42+
3243
def default(args):
3344
format_(args)
3445

3546
if nightly():
36-
run("cargo", "clippy", "--all-features", "--tests", "--benches")
47+
run(
48+
"cargo",
49+
"clippy",
50+
"--all-features",
51+
"--tests",
52+
"--benches",
53+
"--",
54+
*LINT_CONFIG,
55+
)
3756
else:
38-
run("cargo", "clippy", "--all-features", "--tests")
57+
run("cargo", "clippy", "--all-features", "--tests", "--", *LINT_CONFIG)
3958

4059
for manifest in gen_examples("Cargo.toml"):
41-
run("cargo", "clippy", "--manifest-path", manifest)
60+
run("cargo", "clippy", "--manifest-path", manifest, "--", *LINT_CONFIG)
4261

4362
run("cargo", "test", "--all-features", "--lib", "--tests")
4463

4564

4665
def check(args):
47-
LINT_CONFIG = (
48-
"--deny",
49-
"warnings",
50-
# We usually want to make the GIL lifetime explicit.
51-
"--deny",
52-
"elided-lifetimes-in-paths",
53-
"--allow",
54-
"clippy::needless-lifetimes",
55-
)
56-
5766
run("cargo", "fmt", "--", "--check")
5867

5968
run(

0 commit comments

Comments
 (0)