Skip to content

Commit b93088d

Browse files
committed
Forbid some lints
1 parent 8a432a8 commit b93088d

4 files changed

Lines changed: 10 additions & 7 deletions

File tree

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ lto = "thin"
5252

5353
[workspace.lints.clippy]
5454
# See: https://doc.rust-lang.org/clippy/lints.html
55-
correctness = { level = "deny", priority = 1 }
56-
suspicious = { level = "deny", priority = 1 }
57-
perf = { level = "deny", priority = 1 }
55+
correctness = { level = "forbid", priority = 1 }
56+
suspicious = { level = "forbid", priority = 1 }
57+
perf = { level = "forbid", priority = 1 }
5858

5959
complexity = { level = "deny", priority = -1 }
6060

@@ -66,5 +66,5 @@ identity_op = "allow"
6666
type_complexity = "allow"
6767
missing_transmute_annotations = "allow"
6868

69-
unwrap_or_default = "deny"
70-
ptr_arg = "deny"
69+
unwrap_or_default = "forbid"
70+
ptr_arg = "forbid"

yjit/src/cruby.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ pub type size_t = u64;
9797
pub type RedefinitionFlag = u32;
9898

9999
#[allow(dead_code)]
100-
#[allow(clippy::all)]
100+
#[allow(clippy::complexity)]
101101
mod autogened {
102102
use super::*;
103103
// Textually include output from rust-bindgen as suggested by its user guide.

zjit/src/cruby.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ pub type RedefinitionFlag = u32;
103103

104104
#[allow(unsafe_op_in_unsafe_fn)]
105105
#[allow(dead_code)]
106+
#[allow(clippy::complexity)]
106107
mod autogened {
107108
use super::*;
108109
// Textually include output from rust-bindgen as suggested by its user guide.

zjit/src/hir.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,12 +947,14 @@ pub enum ValidationError {
947947
DuplicateInstruction(BlockId, InsnId),
948948
}
949949

950+
#[allow(clippy::needless_bool)]
950951
fn can_direct_send(iseq: *const rb_iseq_t) -> bool {
951952
if unsafe { rb_get_iseq_flags_has_rest(iseq) } { false }
952953
else if unsafe { rb_get_iseq_flags_has_opt(iseq) } { false }
953954
else if unsafe { rb_get_iseq_flags_has_kw(iseq) } { false }
954955
else if unsafe { rb_get_iseq_flags_has_kwrest(iseq) } { false }
955-
else { !unsafe { rb_get_iseq_flags_has_block(iseq) } }
956+
else if unsafe { rb_get_iseq_flags_has_block(iseq) } { false }
957+
else { true }
956958
}
957959

958960
/// A [`Function`], which is analogous to a Ruby ISeq, is a control-flow graph of [`Block`]s

0 commit comments

Comments
 (0)