Skip to content

Commit 3041164

Browse files
committed
Temporarily allow all lints which occur
They will be removed one by one
1 parent 1889c6c commit 3041164

File tree

9 files changed

+69
-12
lines changed

9 files changed

+69
-12
lines changed

Cargo.toml

Lines changed: 60 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -144,21 +144,17 @@ unused_lifetimes = "warn"
144144
semicolon_in_expressions_from_macros = "warn"
145145

146146
[workspace.lints.clippy]
147-
# TODO: Remove the tidy test once the lint table is stable
147+
# FIXME Remove the tidy test once the lint table is stable
148148

149-
# lint groups
149+
## lint groups
150150
complexity = { level = "warn", priority = -1 }
151151
correctness = { level = "deny", priority = -1 }
152152
perf = { level = "deny", priority = -1 }
153153
restriction = { level = "allow", priority = -1 }
154154
style = { level = "warn", priority = -1 }
155155
suspicious = { level = "warn", priority = -1 }
156156

157-
# allow following lints
158-
collapsible_if = "allow"
159-
needless_pass_by_value = "allow"
160-
nonminimal_bool = "allow"
161-
redundant_pattern_matching = "allow"
157+
## allow following lints
162158
# () makes a fine error in most cases
163159
result_unit_err = "allow"
164160
# We don't expose public APIs that matter like this
@@ -171,16 +167,68 @@ enum_variant_names = "allow"
171167
new_ret_no_self = "allow"
172168
non_canonical_clone_impl = "allow"
173169
non_canonical_partial_ord_impl = "allow"
174-
format_collect = "allow"
170+
derived_hash_with_manual_eq = "allow"
175171

176-
# Following lints should be tackled at some point
172+
## Following lints should be tackled at some point
173+
bind_instead_of_map = "allow"
174+
borrowed_box = "allow"
175+
borrow_deref_ref = "allow"
176+
collapsible_if = "allow"
177+
collapsible_match = "allow"
178+
clone_on_copy = "allow"
179+
derivable_impls = "allow"
180+
double_parens = "allow"
181+
explicit_auto_deref = "allow"
182+
field_reassign_with_default = "allow"
183+
forget_non_drop = "allow"
184+
format_collect = "allow"
185+
for_kv_map = "allow"
186+
filter_map_bool_then = "allow"
187+
from_str_radix_10 = "allow"
188+
get_first = "allow"
189+
if_same_then_else = "allow"
190+
large_enum_variant = "allow"
191+
let_and_return = "allow"
192+
manual_find = "allow"
193+
manual_map = "allow"
194+
map_clone = "allow"
195+
match_like_matches_macro = "allow"
196+
match_single_binding = "allow"
197+
needless_borrow = "allow"
198+
needless_doctest_main = "allow"
199+
needless_lifetimes = "allow"
200+
needless_pass_by_value = "allow"
201+
needless_return = "allow"
202+
new_without_default = "allow"
203+
nonminimal_bool = "allow"
204+
non_minimal_cfg = "allow"
205+
only_used_in_recursion = "allow"
206+
op_ref = "allow"
207+
option_map_unit_fn = "allow"
208+
partialeq_to_none = "allow"
209+
ptr_arg = "allow"
210+
redundant_closure = "allow"
211+
redundant_pattern_matching = "allow"
212+
search_is_some = "allow"
213+
self_named_constructors = "allow"
214+
single_match = "allow"
215+
skip_while_next = "allow"
177216
too_many_arguments = "allow"
217+
toplevel_ref_arg = "allow"
178218
type_complexity = "allow"
179-
180-
# warn at following lints
219+
unnecessary_cast = "allow"
220+
unnecessary_filter_map = "allow"
221+
unnecessary_lazy_evaluations = "allow"
222+
unnecessary_mut_passed = "allow"
223+
useless_conversion = "allow"
224+
useless_format = "allow"
225+
wildcard_in_or_patterns = "allow"
226+
wrong_self_convention = "allow"
227+
228+
## warn at following lints
181229
dbg_macro = "warn"
182230
todo = "warn"
183-
unimplemented = "warn"
231+
unimplemented = "allow"
184232
rc_buffer = "warn"
185233
# FIXME enable this, we use this pattern a lot so its annoying work ...
186234
# str_to_string = "warn"

crates/base-db/src/input.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ impl ReleaseChannel {
261261
}
262262
}
263263

264+
#[allow(clippy::should_implement_trait)]
264265
pub fn from_str(str: &str) -> Option<Self> {
265266
Some(match str {
266267
"" | "stable" => ReleaseChannel::Stable,

crates/hir-def/src/lang_item.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ macro_rules! language_item_table {
260260
}
261261

262262
/// Opposite of [`LangItem::name`]
263+
#[allow(clippy::should_implement_trait)]
263264
pub fn from_str(name: &str) -> Option<Self> {
264265
match name {
265266
$( stringify!($name) => Some(LangItem::$variant), )*

crates/hir-expand/src/builtin_fn_macro.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,7 @@ fn unreachable_expand(
392392
ExpandResult::ok(call)
393393
}
394394

395+
#[allow(clippy::never_loop)]
395396
fn use_panic_2021(db: &dyn ExpandDatabase, span: Span) -> bool {
396397
// To determine the edition, we check the first span up the expansion
397398
// stack that does not have #[allow_internal_unstable(edition_panic)].

crates/hir-expand/src/quote.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//! A simplified version of quote-crate like quasi quote macro
2+
#![allow(clippy::crate_in_macro_def)]
23

34
use span::Span;
45
use syntax::format_smolstr;

crates/ide/src/syntax_tree.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ fn syntax_tree_for_string(token: &SyntaxToken, text_range: TextRange) -> Option<
5252
}
5353
}
5454

55+
#[allow(clippy::redundant_locals)]
5556
fn syntax_tree_for_token(node: &SyntaxToken, text_range: TextRange) -> Option<String> {
5657
// Range of the full node
5758
let node_range = node.text_range();

crates/rust-analyzer/src/cli/rustc_tests.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ const SUPPORTED_DIAGNOSTICS: &[DiagnosticCode] = &[
226226
];
227227

228228
impl flags::RustcTests {
229+
#[allow(clippy::redundant_locals)]
229230
pub fn run(self) -> Result<()> {
230231
let mut tester = Tester::new()?;
231232
let walk_dir = WalkDir::new(self.rustc_repo.join("tests/ui"));

crates/span/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ impl fmt::Debug for HirFileIdRepr {
225225
}
226226

227227
impl From<FileId> for HirFileId {
228+
#[allow(clippy::let_unit_value)]
228229
fn from(id: FileId) -> Self {
229230
_ = Self::ASSERT_MAX_FILE_ID_IS_SAME;
230231
assert!(id.index() <= Self::MAX_HIR_FILE_ID, "FileId index {} is too large", id.index());
@@ -233,6 +234,7 @@ impl From<FileId> for HirFileId {
233234
}
234235

235236
impl From<MacroFileId> for HirFileId {
237+
#[allow(clippy::let_unit_value)]
236238
fn from(MacroFileId { macro_call_id: MacroCallId(id) }: MacroFileId) -> Self {
237239
_ = Self::ASSERT_MAX_FILE_ID_IS_SAME;
238240
let id = id.as_u32();

lib/la-arena/src/map.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ where
252252
{
253253
/// Ensures a value is in the entry by inserting the default value if empty, and returns a mutable reference
254254
/// to the value in the entry.
255+
#[allow(clippy::unwrap_or_default)]
255256
pub fn or_default(self) -> &'a mut V {
256257
self.or_insert_with(Default::default)
257258
}

0 commit comments

Comments
 (0)