Skip to content

Commit fcfb881

Browse files
committed
Switch [lints] table syntax to not use dotted keys.
Dependabot’s parser currently doesn't like this for some reason (<dependabot/dependabot-core#10453>), and while that’s certainly a bug, I’d like to get dependency updates working again, and this is in fact the second time I’ve found a bug in tools’ handling of dotted keys (the first time was <toml-rs/toml#673>), so it is pragmatic to not do the thing that often doesn't work. For now, at least. (The reasons I prefer the dotted keys are because one doesn’t have to scan upward to the most recent table header to see whether the lint is `rust` or `clippy`, and it’s more like `#[warn()]` syntax.)
1 parent 2d1dc46 commit fcfb881

File tree

2 files changed

+166
-164
lines changed

2 files changed

+166
-164
lines changed

Cargo.toml

+83-82
Original file line numberDiff line numberDiff line change
@@ -145,102 +145,103 @@ wgpu = { version = "22.1.0", default-features = false, features = ["wgsl"] }
145145
yield-progress = { version = "0.1.6", default-features = false }
146146

147147
# Note: Lints are also necessarily redefined in the workspaces other than this one.
148-
[workspace.lints]
148+
[workspace.lints.rust]
149149
# rustc lints that are set to deny
150-
rust.rust_2018_idioms = { level = "deny", priority = -1 }
151-
rust.unsafe_op_in_unsafe_fn = "deny"
150+
rust_2018_idioms = { level = "deny", priority = -1 }
151+
unsafe_op_in_unsafe_fn = "deny"
152152

153153
# rustc lints that are set to warn
154-
rust.explicit_outlives_requirements = "warn"
155-
rust.missing_debug_implementations = "warn"
156-
rust.missing_docs = "warn"
157-
rust.noop_method_call = "warn"
158-
rust.redundant_lifetimes = "warn"
159-
rust.trivial_casts = "warn"
160-
rust.trivial_numeric_casts = "warn"
161-
rust.unnameable_types = "warn"
162-
rust.unused_extern_crates = "warn"
163-
rust.unused_lifetimes = "warn"
164-
rust.unused_qualifications = "warn"
154+
explicit_outlives_requirements = "warn"
155+
missing_debug_implementations = "warn"
156+
missing_docs = "warn"
157+
noop_method_call = "warn"
158+
redundant_lifetimes = "warn"
159+
trivial_casts = "warn"
160+
trivial_numeric_casts = "warn"
161+
unnameable_types = "warn"
162+
unused_extern_crates = "warn"
163+
unused_lifetimes = "warn"
164+
unused_qualifications = "warn"
165165
# This lint has false positives on dev-dependencies. Occasionally turn it on to audit non-dev deps.
166-
# rust.unused_crate_dependencies = "warn"
166+
# unused_crate_dependencies = "warn"
167167

168+
[workspace.lints.clippy]
168169
# clippy default lints that are set to allow
169-
clippy.collapsible_else_if = "allow"
170-
clippy.collapsible_if = "allow"
171-
clippy.match_ref_pats = "allow"
172-
clippy.needless_update = "allow"
173-
clippy.single_match = "allow"
170+
collapsible_else_if = "allow"
171+
collapsible_if = "allow"
172+
match_ref_pats = "allow"
173+
needless_update = "allow"
174+
single_match = "allow"
174175

175176
# clippy::pedantic lints that are set to allow
176-
clippy.cast_possible_truncation = "allow" # we would need an alternative for intentional from-float saturation and to-float precision loss
177-
clippy.cast_precision_loss = "allow" # consider enabling
178-
clippy.cast_sign_loss = "allow" # consider enabling
179-
clippy.default_trait_access = "allow"
180-
clippy.empty_enum = "allow"
181-
clippy.enum_glob_use = "allow"
182-
clippy.explicit_iter_loop = "allow" # I prefer the opposite style
183-
clippy.float_cmp = "allow"
184-
clippy.from_iter_instead_of_collect = "allow" # <https://github.com/rust-lang/rust-clippy/issues/7213>
185-
clippy.if_not_else = "allow"
186-
clippy.inline_always = "allow"
187-
clippy.items_after_statements = "allow" # we use this sparingly
188-
clippy.manual_assert = "allow"
189-
clippy.many_single_char_names = "allow"
190-
clippy.match_bool = "allow"
191-
clippy.match_same_arms = "allow"
192-
clippy.missing_errors_doc = "allow" # consider enabling
193-
clippy.missing_panics_doc = "allow" # consider enabling
194-
clippy.module_name_repetitions = "allow" # would use except for <https://github.com/rust-lang/rust-clippy/issues/8524>
195-
clippy.must_use_candidate = "allow" # consider enabling
196-
clippy.no_effect_underscore_binding = "allow"
197-
clippy.range_plus_one = "allow" # https://github.com/rust-lang/rust-clippy/issues/3307
198-
clippy.redundant_closure_for_method_calls = "allow" # consider enabling
199-
clippy.redundant_else = "allow"
200-
clippy.semicolon_if_nothing_returned = "allow"
201-
clippy.similar_names = "allow"
202-
clippy.single_match_else = "allow"
203-
clippy.struct_excessive_bools = "allow"
204-
clippy.too_many_lines = "allow"
205-
clippy.unreadable_literal = "allow"
206-
clippy.wildcard_imports = "allow" # we use this sparingly
177+
cast_possible_truncation = "allow" # we would need an alternative for intentional from-float saturation and to-float precision loss
178+
cast_precision_loss = "allow" # consider enabling
179+
cast_sign_loss = "allow" # consider enabling
180+
default_trait_access = "allow"
181+
empty_enum = "allow"
182+
enum_glob_use = "allow"
183+
explicit_iter_loop = "allow" # I prefer the opposite style
184+
float_cmp = "allow"
185+
from_iter_instead_of_collect = "allow" # <https://github.com/rust-lang/rust-clippy/issues/7213>
186+
if_not_else = "allow"
187+
inline_always = "allow"
188+
items_after_statements = "allow" # we use this sparingly
189+
manual_assert = "allow"
190+
many_single_char_names = "allow"
191+
match_bool = "allow"
192+
match_same_arms = "allow"
193+
missing_errors_doc = "allow" # consider enabling
194+
missing_panics_doc = "allow" # consider enabling
195+
module_name_repetitions = "allow" # would use except for <https://github.com/rust-lang/rust-clippy/issues/8524>
196+
must_use_candidate = "allow" # consider enabling
197+
no_effect_underscore_binding = "allow"
198+
range_plus_one = "allow" # https://github.com/rust-lang/rust-clippy/issues/3307
199+
redundant_closure_for_method_calls = "allow" # consider enabling
200+
redundant_else = "allow"
201+
semicolon_if_nothing_returned = "allow"
202+
similar_names = "allow"
203+
single_match_else = "allow"
204+
struct_excessive_bools = "allow"
205+
too_many_lines = "allow"
206+
unreadable_literal = "allow"
207+
wildcard_imports = "allow" # we use this sparingly
207208

208209
# clippy::restriction lints that are set to allow (to note why we aren't using them)
209-
clippy.shadow_unrelated = "allow" # would use except for <https://github.com/rust-lang/rust-clippy/issues/10780>
210+
shadow_unrelated = "allow" # would use except for <https://github.com/rust-lang/rust-clippy/issues/10780>
210211

211212
# clippy lints that are set to deny
212-
clippy.should_panic_without_expect = "deny"
213+
should_panic_without_expect = "deny"
213214

214215
# clippy lints that are set to warn
215-
clippy.pedantic = { level = "warn", priority = -1 }
216-
clippy.assigning_clones = "warn"
217-
clippy.cast_lossless = "warn"
218-
clippy.cast_possible_wrap = "warn"
219-
clippy.doc_markdown = "warn"
220-
clippy.exhaustive_enums = "warn"
221-
clippy.exhaustive_structs = "warn"
222-
clippy.into_iter_without_iter = "warn"
223-
clippy.inconsistent_struct_constructor = "warn"
224-
clippy.infinite_loop = "warn"
225-
clippy.iter_without_into_iter = "warn"
226-
clippy.large_futures = "warn"
227-
clippy.large_stack_frames = "warn"
228-
clippy.manual_let_else = "warn"
229-
clippy.map_unwrap_or = "warn"
230-
clippy.missing_fields_in_debug = "warn"
231-
clippy.modulo_arithmetic = "warn"
232-
clippy.needless_pass_by_value = "warn"
233-
clippy.option_as_ref_cloned = "warn"
234-
clippy.pub_without_shorthand = "warn"
235-
clippy.return_self_not_must_use = "warn"
236-
clippy.suboptimal_flops = "warn"
237-
clippy.trivially_copy_pass_by_ref = "warn"
238-
clippy.undocumented_unsafe_blocks = "warn"
239-
clippy.uninlined_format_args = "warn"
240-
clippy.unnecessary_self_imports = "warn"
241-
clippy.unnecessary_wraps = "warn"
242-
clippy.unused_async = "warn"
243-
clippy.wrong_self_convention = "warn"
216+
pedantic = { level = "warn", priority = -1 }
217+
assigning_clones = "warn"
218+
cast_lossless = "warn"
219+
cast_possible_wrap = "warn"
220+
doc_markdown = "warn"
221+
exhaustive_enums = "warn"
222+
exhaustive_structs = "warn"
223+
into_iter_without_iter = "warn"
224+
inconsistent_struct_constructor = "warn"
225+
infinite_loop = "warn"
226+
iter_without_into_iter = "warn"
227+
large_futures = "warn"
228+
large_stack_frames = "warn"
229+
manual_let_else = "warn"
230+
map_unwrap_or = "warn"
231+
missing_fields_in_debug = "warn"
232+
modulo_arithmetic = "warn"
233+
needless_pass_by_value = "warn"
234+
option_as_ref_cloned = "warn"
235+
pub_without_shorthand = "warn"
236+
return_self_not_must_use = "warn"
237+
suboptimal_flops = "warn"
238+
trivially_copy_pass_by_ref = "warn"
239+
undocumented_unsafe_blocks = "warn"
240+
uninlined_format_args = "warn"
241+
unnecessary_self_imports = "warn"
242+
unnecessary_wraps = "warn"
243+
unused_async = "warn"
244+
wrong_self_convention = "warn"
244245

245246
[profile.dev]
246247
# Enable some optimization to improve interactive performance in manual testing/experimenting.

all-is-cubes-wasm/Cargo.toml

+83-82
Original file line numberDiff line numberDiff line change
@@ -82,105 +82,106 @@ features = [
8282
[dev-dependencies]
8383
wasm-bindgen-test = "0.3"
8484

85-
[lints]
85+
[lints.rust]
8686
# rustc lints that are set to deny
87-
rust.rust_2018_idioms = { level = "deny", priority = -1 }
88-
rust.unsafe_op_in_unsafe_fn = "deny"
87+
rust_2018_idioms = { level = "deny", priority = -1 }
88+
unsafe_op_in_unsafe_fn = "deny"
8989

9090
# rustc lints that are set to warn
91-
rust.explicit_outlives_requirements = "warn"
92-
rust.missing_debug_implementations = "warn"
93-
rust.missing_docs = "warn"
94-
rust.noop_method_call = "warn"
95-
rust.redundant_lifetimes = "warn"
96-
rust.trivial_casts = "warn"
97-
rust.trivial_numeric_casts = "warn"
98-
rust.unnameable_types = "warn"
99-
rust.unused_extern_crates = "warn"
100-
rust.unused_lifetimes = "warn"
101-
rust.unused_qualifications = "warn"
91+
explicit_outlives_requirements = "warn"
92+
missing_debug_implementations = "warn"
93+
missing_docs = "warn"
94+
noop_method_call = "warn"
95+
redundant_lifetimes = "warn"
96+
trivial_casts = "warn"
97+
trivial_numeric_casts = "warn"
98+
unnameable_types = "warn"
99+
unused_extern_crates = "warn"
100+
unused_lifetimes = "warn"
101+
unused_qualifications = "warn"
102102
# This lint has false positives on dev-dependencies. Occasionally turn it on to audit non-dev deps.
103103
# rust.unused_crate_dependencies = "warn"
104104

105+
[lints.clippy]
105106
# clippy default lints that are set to allow
106-
clippy.collapsible_else_if = "allow"
107-
clippy.collapsible_if = "allow"
108-
clippy.match_ref_pats = "allow"
109-
clippy.needless_update = "allow"
110-
clippy.single_match = "allow"
107+
collapsible_else_if = "allow"
108+
collapsible_if = "allow"
109+
match_ref_pats = "allow"
110+
needless_update = "allow"
111+
single_match = "allow"
111112

112113
# clippy::pedantic lints that are set to allow
113-
clippy.cast_possible_truncation = "allow" # we would need an alternative for intentional from-float saturation and to-float precision loss
114-
clippy.cast_precision_loss = "allow" # consider enabling
115-
clippy.cast_sign_loss = "allow" # consider enabling
116-
clippy.default_trait_access = "allow"
117-
clippy.empty_enum = "allow"
118-
clippy.enum_glob_use = "allow"
119-
clippy.explicit_iter_loop = "allow" # I prefer the opposite style
120-
clippy.float_cmp = "allow"
121-
clippy.from_iter_instead_of_collect = "allow" # <https://github.com/rust-lang/rust-clippy/issues/7213>
122-
clippy.if_not_else = "allow"
123-
clippy.inline_always = "allow"
124-
clippy.items_after_statements = "allow" # we use this sparingly
125-
clippy.manual_assert = "allow"
126-
clippy.many_single_char_names = "allow"
127-
clippy.match_bool = "allow"
128-
clippy.match_same_arms = "allow"
129-
clippy.missing_errors_doc = "allow" # consider enabling
130-
clippy.missing_panics_doc = "allow" # consider enabling
131-
clippy.module_name_repetitions = "allow" # would use except for <https://github.com/rust-lang/rust-clippy/issues/8524>
132-
clippy.must_use_candidate = "allow" # consider enabling
133-
clippy.no_effect_underscore_binding = "allow"
134-
clippy.range_plus_one = "allow" # https://github.com/rust-lang/rust-clippy/issues/3307
135-
clippy.redundant_closure_for_method_calls = "allow" # consider enabling
136-
clippy.redundant_else = "allow"
137-
clippy.semicolon_if_nothing_returned = "allow"
138-
clippy.similar_names = "allow"
139-
clippy.single_match_else = "allow"
140-
clippy.struct_excessive_bools = "allow"
141-
clippy.too_many_lines = "allow"
142-
clippy.unreadable_literal = "allow"
143-
clippy.wildcard_imports = "allow" # we use this sparingly
114+
cast_possible_truncation = "allow" # we would need an alternative for intentional from-float saturation and to-float precision loss
115+
cast_precision_loss = "allow" # consider enabling
116+
cast_sign_loss = "allow" # consider enabling
117+
default_trait_access = "allow"
118+
empty_enum = "allow"
119+
enum_glob_use = "allow"
120+
explicit_iter_loop = "allow" # I prefer the opposite style
121+
float_cmp = "allow"
122+
from_iter_instead_of_collect = "allow" # <https://github.com/rust-lang/rust-clippy/issues/7213>
123+
if_not_else = "allow"
124+
inline_always = "allow"
125+
items_after_statements = "allow" # we use this sparingly
126+
manual_assert = "allow"
127+
many_single_char_names = "allow"
128+
match_bool = "allow"
129+
match_same_arms = "allow"
130+
missing_errors_doc = "allow" # consider enabling
131+
missing_panics_doc = "allow" # consider enabling
132+
module_name_repetitions = "allow" # would use except for <https://github.com/rust-lang/rust-clippy/issues/8524>
133+
must_use_candidate = "allow" # consider enabling
134+
no_effect_underscore_binding = "allow"
135+
range_plus_one = "allow" # https://github.com/rust-lang/rust-clippy/issues/3307
136+
redundant_closure_for_method_calls = "allow" # consider enabling
137+
redundant_else = "allow"
138+
semicolon_if_nothing_returned = "allow"
139+
similar_names = "allow"
140+
single_match_else = "allow"
141+
struct_excessive_bools = "allow"
142+
too_many_lines = "allow"
143+
unreadable_literal = "allow"
144+
wildcard_imports = "allow" # we use this sparingly
144145

145146
# clippy::restriction lints that are set to allow (to note why we aren't using them)
146-
clippy.shadow_unrelated = "allow" # would use except for <https://github.com/rust-lang/rust-clippy/issues/10780>
147+
shadow_unrelated = "allow" # would use except for <https://github.com/rust-lang/rust-clippy/issues/10780>
147148

148149
# clippy lints that are set to deny
149-
clippy.should_panic_without_expect = "deny"
150+
should_panic_without_expect = "deny"
150151

151152
# clippy lints that are set to warn
152-
clippy.pedantic = { level = "warn", priority = -1 }
153-
clippy.assigning_clones = "warn"
154-
clippy.cast_lossless = "warn"
155-
clippy.cast_possible_wrap = "warn"
156-
clippy.doc_markdown = "warn"
157-
clippy.exhaustive_enums = "warn"
158-
clippy.exhaustive_structs = "warn"
159-
clippy.into_iter_without_iter = "warn"
160-
clippy.inconsistent_struct_constructor = "warn"
161-
clippy.infinite_loop = "warn"
162-
clippy.iter_without_into_iter = "warn"
163-
clippy.large_futures = "warn"
164-
clippy.large_stack_frames = "warn"
165-
clippy.manual_let_else = "warn"
166-
clippy.map_unwrap_or = "warn"
167-
clippy.missing_fields_in_debug = "warn"
168-
clippy.modulo_arithmetic = "warn"
169-
clippy.needless_pass_by_value = "warn"
170-
clippy.option_as_ref_cloned = "warn"
171-
clippy.pub_without_shorthand = "warn"
172-
clippy.return_self_not_must_use = "warn"
173-
clippy.suboptimal_flops = "warn"
174-
clippy.trivially_copy_pass_by_ref = "warn"
175-
clippy.undocumented_unsafe_blocks = "warn"
176-
clippy.uninlined_format_args = "warn"
177-
clippy.unnecessary_self_imports = "warn"
178-
clippy.unnecessary_wraps = "warn"
179-
clippy.unused_async = "warn"
180-
clippy.wrong_self_convention = "warn"
153+
pedantic = { level = "warn", priority = -1 }
154+
assigning_clones = "warn"
155+
cast_lossless = "warn"
156+
cast_possible_wrap = "warn"
157+
doc_markdown = "warn"
158+
exhaustive_enums = "warn"
159+
exhaustive_structs = "warn"
160+
into_iter_without_iter = "warn"
161+
inconsistent_struct_constructor = "warn"
162+
infinite_loop = "warn"
163+
iter_without_into_iter = "warn"
164+
large_futures = "warn"
165+
large_stack_frames = "warn"
166+
manual_let_else = "warn"
167+
map_unwrap_or = "warn"
168+
missing_fields_in_debug = "warn"
169+
modulo_arithmetic = "warn"
170+
needless_pass_by_value = "warn"
171+
option_as_ref_cloned = "warn"
172+
pub_without_shorthand = "warn"
173+
return_self_not_must_use = "warn"
174+
suboptimal_flops = "warn"
175+
trivially_copy_pass_by_ref = "warn"
176+
undocumented_unsafe_blocks = "warn"
177+
uninlined_format_args = "warn"
178+
unnecessary_self_imports = "warn"
179+
unnecessary_wraps = "warn"
180+
unused_async = "warn"
181+
wrong_self_convention = "warn"
181182

182183
# wasm-specific config
183-
clippy.arc_with_non_send_sync = "allow"
184+
arc_with_non_send_sync = "allow"
184185

185186
[profile.dev]
186187
# Enable some optimization to improve interactive performance in manual testing/experimenting.

0 commit comments

Comments
 (0)