Skip to content

Commit 13fd37b

Browse files
authored
Migrate to the v5 lint set (#262)
1 parent 9b0ff5f commit 13fd37b

File tree

4 files changed

+12
-25
lines changed

4 files changed

+12
-25
lines changed

Cargo.toml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,58 +17,47 @@ license = "Apache-2.0 OR MIT"
1717
repository = "https://github.com/linebender/parley"
1818

1919
[workspace.lints]
20-
# LINEBENDER LINT SET - Cargo.toml - v2
20+
rust.unsafe_code = "deny"
21+
22+
# LINEBENDER LINT SET - Cargo.toml - v5
2123
# See https://linebender.org/wiki/canonical-lints/
2224
rust.keyword_idents_2024 = "forbid"
2325
rust.non_ascii_idents = "forbid"
2426
rust.non_local_definitions = "forbid"
2527
rust.unsafe_op_in_unsafe_fn = "forbid"
2628

2729
rust.elided_lifetimes_in_paths = "warn"
28-
rust.let_underscore_drop = "warn"
2930
rust.missing_debug_implementations = "warn"
3031
rust.missing_docs = "warn"
31-
rust.single_use_lifetimes = "warn"
3232
rust.trivial_numeric_casts = "warn"
3333
rust.unexpected_cfgs = "warn"
34-
rust.unit_bindings = "warn"
3534
rust.unnameable_types = "warn"
3635
rust.unreachable_pub = "warn"
3736
rust.unused_import_braces = "warn"
3837
rust.unused_lifetimes = "warn"
3938
rust.unused_macro_rules = "warn"
40-
rust.unused_qualifications = "warn"
41-
rust.variant_size_differences = "warn"
4239

43-
clippy.allow_attributes = "warn"
40+
clippy.too_many_arguments = "allow"
41+
4442
clippy.allow_attributes_without_reason = "warn"
4543
clippy.cast_possible_truncation = "warn"
4644
clippy.collection_is_never_read = "warn"
4745
clippy.dbg_macro = "warn"
4846
clippy.debug_assert_with_mut_call = "warn"
4947
clippy.doc_markdown = "warn"
50-
clippy.exhaustive_enums = "warn"
51-
clippy.fn_to_numeric_cast_any = "forbid"
48+
clippy.fn_to_numeric_cast_any = "warn"
5249
clippy.infinite_loop = "warn"
53-
clippy.large_include_file = "warn"
5450
clippy.large_stack_arrays = "warn"
55-
clippy.match_same_arms = "warn"
5651
clippy.mismatching_type_param_order = "warn"
5752
clippy.missing_assert_message = "warn"
58-
clippy.missing_errors_doc = "warn"
5953
clippy.missing_fields_in_debug = "warn"
60-
clippy.missing_panics_doc = "warn"
61-
clippy.partial_pub_fields = "warn"
62-
clippy.return_self_not_must_use = "warn"
6354
clippy.same_functions_in_if_condition = "warn"
6455
clippy.semicolon_if_nothing_returned = "warn"
6556
clippy.shadow_unrelated = "warn"
6657
clippy.should_panic_without_expect = "warn"
6758
clippy.todo = "warn"
68-
clippy.trivially_copy_pass_by_ref = "warn"
6959
clippy.unseparated_literal_suffix = "warn"
7060
clippy.use_self = "warn"
71-
clippy.wildcard_imports = "warn"
7261

7362
clippy.cargo_common_metadata = "warn"
7463
clippy.negative_feature_names = "warn"

examples/vello_editor/src/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#![expect(
66
missing_debug_implementations,
77
unreachable_pub,
8-
clippy::allow_attributes,
98
clippy::allow_attributes_without_reason,
109
clippy::cast_possible_truncation,
1110
clippy::shadow_unrelated,

fontique/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,20 @@
1212
// END LINEBENDER LINT SET
1313
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
1414
#![cfg_attr(not(feature = "std"), no_std)]
15+
#![allow(unsafe_code, reason = "We access platform libraries using ffi.")]
1516
#![allow(missing_docs, reason = "We have many as-yet undocumented items.")]
1617
#![expect(
1718
missing_debug_implementations,
1819
unnameable_types,
1920
unreachable_pub,
20-
clippy::allow_attributes,
2121
clippy::allow_attributes_without_reason,
2222
clippy::cast_possible_truncation,
23-
clippy::exhaustive_enums,
2423
clippy::shadow_unrelated,
2524
reason = "Deferred"
2625
)]
2726
#![allow(
2827
single_use_lifetimes,
29-
reason = "Deferred, only apply in some feature sets so not expect"
28+
reason = "False positive: https://github.com/rust-lang/rust/issues/129255"
3029
)]
3130

3231
#[cfg(not(any(feature = "std", feature = "libm")))]

parley/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,17 @@
8484
#![allow(missing_docs, reason = "We have many as-yet undocumented items.")]
8585
#![expect(
8686
missing_debug_implementations,
87-
single_use_lifetimes,
8887
unnameable_types,
89-
clippy::allow_attributes,
9088
clippy::allow_attributes_without_reason,
9189
clippy::cast_possible_truncation,
92-
clippy::exhaustive_enums,
9390
clippy::missing_assert_message,
94-
clippy::missing_panics_doc,
9591
clippy::shadow_unrelated,
9692
reason = "Deferred"
9793
)]
94+
#![expect(
95+
single_use_lifetimes,
96+
reason = "False positive: https://github.com/rust-lang/rust/issues/129255"
97+
)]
9898

9999
#[cfg(not(any(feature = "std", feature = "libm")))]
100100
compile_error!("parley requires either the `std` or `libm` feature to be enabled");

0 commit comments

Comments
 (0)