Skip to content
This repository was archived by the owner on Apr 10, 2026. It is now read-only.

Commit b265ae0

Browse files
committed
copy less strict lint config from rust-gpu
1 parent 3dc9770 commit b265ae0

File tree

2 files changed

+75
-25
lines changed

2 files changed

+75
-25
lines changed

Cargo.toml

Lines changed: 75 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -43,28 +43,82 @@ cargo-util-schemas = "0.8.2"
4343
semver = "1.0.26"
4444
dunce = "1.0.5"
4545

46+
47+
4648
[workspace.lints.rust]
4749
missing_docs = "warn"
50+
# copied from rust-gpu
51+
future_incompatible = "warn"
52+
nonstandard_style = "warn"
53+
rust_2018_idioms = "warn"
4854

4955
[workspace.lints.clippy]
50-
all = { level = "warn", priority = 0 }
51-
pedantic = { level = "warn", priority = 0 }
52-
nursery = { level = "warn", priority = 0 }
53-
cargo = { level = "warn", priority = 0 }
54-
restriction = { level = "warn", priority = 0 }
55-
blanket_clippy_restriction_lints = { level = "allow", priority = 1 }
56-
57-
arithmetic_side_effects = { level = "allow", priority = 1 }
58-
absolute_paths = { level = "allow", priority = 1 }
59-
cargo_common_metadata = { level = "allow", priority = 1 }
60-
implicit_return = { level = "allow", priority = 1 }
61-
single_call_fn = { level = "allow", priority = 1 }
62-
question_mark_used = { level = "allow", priority = 1 }
63-
multiple_crate_versions = { level = "allow", priority = 1 }
64-
pub_with_shorthand = { level = "allow", priority = 1 }
65-
partial_pub_fields = { level = "allow", priority = 1 }
66-
pattern_type_mismatch = { level = "allow", priority = 1 }
67-
std_instead_of_alloc = { level = "allow", priority = 1 }
68-
arbitrary_source_item_ordering = { level = "allow", priority = 1 }
69-
missing_inline_in_public_items = { level = "allow", priority = 1 }
70-
doc_paragraphs_missing_punctuation = { level = "allow", priority = 1 }
56+
print_stdout = "deny"
57+
print_stderr = "deny"
58+
exit = "deny"
59+
# copied from rust-gpu
60+
all = { level = "warn", priority = -1 }
61+
await_holding_lock = "warn"
62+
char_lit_as_u8 = "warn"
63+
checked_conversions = "warn"
64+
dbg_macro = "warn"
65+
debug_assert_with_mut_call = "warn"
66+
doc_markdown = "warn"
67+
empty_enums = "warn"
68+
enum_glob_use = "warn"
69+
#exit = "warn"
70+
expl_impl_clone_on_copy = "warn"
71+
explicit_deref_methods = "warn"
72+
explicit_into_iter_loop = "warn"
73+
fallible_impl_from = "warn"
74+
filter_map_next = "warn"
75+
flat_map_option = "warn"
76+
float_cmp_const = "warn"
77+
fn_params_excessive_bools = "warn"
78+
from_iter_instead_of_collect = "warn"
79+
if_let_mutex = "warn"
80+
implicit_clone = "warn"
81+
imprecise_flops = "warn"
82+
inefficient_to_string = "warn"
83+
invalid_upcast_comparisons = "warn"
84+
large_digit_groups = "warn"
85+
large_stack_arrays = "warn"
86+
large_types_passed_by_value = "warn"
87+
let_unit_value = "warn"
88+
linkedlist = "warn"
89+
lossy_float_literal = "warn"
90+
macro_use_imports = "warn"
91+
manual_ok_or = "warn"
92+
map_err_ignore = "warn"
93+
map_flatten = "warn"
94+
map_unwrap_or = "warn"
95+
match_same_arms = "warn"
96+
match_wild_err_arm = "warn"
97+
match_wildcard_for_single_variants = "warn"
98+
mem_forget = "warn"
99+
missing_enforced_import_renames = "warn"
100+
mut_mut = "warn"
101+
mutex_integer = "warn"
102+
needless_borrow = "warn"
103+
needless_continue = "warn"
104+
needless_for_each = "warn"
105+
option_option = "warn"
106+
path_buf_push_overwrite = "warn"
107+
ptr_as_ptr = "warn"
108+
rc_mutex = "warn"
109+
ref_option_ref = "warn"
110+
rest_pat_in_fully_bound_structs = "warn"
111+
same_functions_in_if_condition = "warn"
112+
semicolon_if_nothing_returned = "warn"
113+
single_match_else = "warn"
114+
string_add_assign = "warn"
115+
string_add = "warn"
116+
string_lit_as_bytes = "warn"
117+
todo = "warn"
118+
trait_duplication_in_bounds = "warn"
119+
unimplemented = "warn"
120+
unnested_or_patterns = "warn"
121+
unused_self = "warn"
122+
useless_transmute = "warn"
123+
verbose_file_reads = "warn"
124+
zero_sized_map_values = "warn"

crates/cargo-gpu/src/main.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ fn main() {
1717
)]
1818
{
1919
eprintln!("Error: {error}");
20-
21-
// `clippy::exit` seems to be a false positive in `main()`.
22-
// See: https://github.com/rust-lang/rust-clippy/issues/13518
23-
#[expect(clippy::restriction, reason = "Our central place for safely exiting")]
2420
std::process::exit(1);
2521
};
2622
}

0 commit comments

Comments
 (0)