Skip to content

Commit ade4c9b

Browse files
committed
Rename lint to better fit lint naming conventions
1 parent 8ec9543 commit ade4c9b

17 files changed

+20
-19
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4430,6 +4430,7 @@ Released 2018-09-13
44304430
[`if_same_then_else`]: https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
44314431
[`if_then_some_else_none`]: https://rust-lang.github.io/rust-clippy/master/index.html#if_then_some_else_none
44324432
[`ifs_same_cond`]: https://rust-lang.github.io/rust-clippy/master/index.html#ifs_same_cond
4433+
[`impl_trait_in_params`]: https://rust-lang.github.io/rust-clippy/master/index.html#impl_trait_in_params
44334434
[`impl_trait_param`]: https://rust-lang.github.io/rust-clippy/master/index.html#impl_trait_param
44344435
[`implicit_clone`]: https://rust-lang.github.io/rust-clippy/master/index.html#implicit_clone
44354436
[`implicit_hasher`]: https://rust-lang.github.io/rust-clippy/master/index.html#implicit_hasher

clippy_lints/src/declared_lints.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ pub(crate) static LINTS: &[&crate::LintInfo] = &[
179179
crate::from_raw_with_void_ptr::FROM_RAW_WITH_VOID_PTR_INFO,
180180
crate::from_str_radix_10::FROM_STR_RADIX_10_INFO,
181181
crate::functions::DOUBLE_MUST_USE_INFO,
182-
crate::functions::IMPL_TRAIT_PARAM_INFO,
182+
crate::functions::IMPL_TRAIT_IN_PARAMS_INFO,
183183
crate::functions::MISNAMED_GETTERS_INFO,
184184
crate::functions::MUST_USE_CANDIDATE_INFO,
185185
crate::functions::MUST_USE_UNIT_INFO,

clippy_lints/src/functions/impl_trait_param.rs renamed to clippy_lints/src/functions/impl_trait_in_params.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use rustc_hir::{intravisit::FnKind, Body, Generics, HirId};
44
use rustc_lint::LateContext;
55
use rustc_span::Span;
66

7-
use super::IMPL_TRAIT_PARAM;
7+
use super::IMPL_TRAIT_IN_PARAMS;
88

99
pub(super) fn check_fn<'tcx>(cx: &LateContext<'_>, kind: &'tcx FnKind<'_>, body: &'tcx Body<'_>, hir_id: HirId) {
1010
if cx.tcx.visibility(cx.tcx.hir().body_owner_def_id(body.id())).is_public() && !is_in_test_function(cx.tcx, hir_id)
@@ -18,7 +18,7 @@ pub(super) fn check_fn<'tcx>(cx: &LateContext<'_>, kind: &'tcx FnKind<'_>, body:
1818
// No generics with nested generics, and no generics like FnMut(x)
1919
span_lint_and_then(
2020
cx,
21-
IMPL_TRAIT_PARAM,
21+
IMPL_TRAIT_IN_PARAMS,
2222
param.span,
2323
&format!("'{}' in the function's parameters", param.name.ident().as_str()),
2424
|diag| {

clippy_lints/src/functions/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
mod impl_trait_param;
1+
mod impl_trait_in_params;
22
mod misnamed_getters;
33
mod must_use;
44
mod not_unsafe_ptr_arg_deref;
@@ -349,7 +349,7 @@ declare_clippy_lint! {
349349
/// }
350350
/// ```
351351
#[clippy::version = "1.68.0"]
352-
pub IMPL_TRAIT_PARAM,
352+
pub IMPL_TRAIT_IN_PARAMS,
353353
style,
354354
"`impl Trait` is used in the function's parameters"
355355
}
@@ -381,7 +381,7 @@ impl_lint_pass!(Functions => [
381381
RESULT_UNIT_ERR,
382382
RESULT_LARGE_ERR,
383383
MISNAMED_GETTERS,
384-
IMPL_TRAIT_PARAM,
384+
IMPL_TRAIT_IN_PARAMS,
385385
]);
386386

387387
impl<'tcx> LateLintPass<'tcx> for Functions {
@@ -399,7 +399,7 @@ impl<'tcx> LateLintPass<'tcx> for Functions {
399399
too_many_lines::check_fn(cx, kind, span, body, self.too_many_lines_threshold);
400400
not_unsafe_ptr_arg_deref::check_fn(cx, kind, decl, body, def_id);
401401
misnamed_getters::check_fn(cx, kind, decl, body, span);
402-
impl_trait_param::check_fn(cx, &kind, body, hir_id);
402+
impl_trait_in_params::check_fn(cx, &kind, body, hir_id);
403403
}
404404

405405
fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) {

clippy_utils/src/ast_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
clippy::similar_names,
77
clippy::wildcard_imports,
88
clippy::enum_glob_use,
9-
clippy::impl_trait_param
9+
clippy::impl_trait_in_params
1010
)]
1111

1212
use crate::{both, over};

clippy_utils/src/check_proc_macro.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![allow(clippy::impl_trait_param)]
1+
#![allow(clippy::impl_trait_in_params)]
22
//! This module handles checking if the span given is from a proc-macro or not.
33
//!
44
//! Proc-macros are capable of setting the span of every token they output to a few possible spans.

clippy_utils/src/hir_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![allow(clippy::impl_trait_param)]
1+
#![allow(clippy::impl_trait_in_params)]
22
use crate::consts::constant_simple;
33
use crate::macros::macro_backtrace;
44
use crate::source::snippet_opt;

clippy_utils/src/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![allow(clippy::similar_names, clippy::impl_trait_param)] // `expr` and `expn`
1+
#![allow(clippy::similar_names, clippy::impl_trait_in_params)] // `expr` and `expn`
22

33
use crate::source::snippet_opt;
44
use crate::visitors::{for_each_expr, Descend};

clippy_utils/src/source.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Utils for extracting, inspecting or transforming source code
22
3-
#![allow(clippy::module_name_repetitions, clippy::impl_trait_param)]
3+
#![allow(clippy::module_name_repetitions, clippy::impl_trait_in_params)]
44

55
use rustc_errors::Applicability;
66
use rustc_hir::{Expr, ExprKind};

tests/ui/borrow_box.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![deny(clippy::borrowed_box)]
22
#![allow(dead_code, unused_variables)]
3-
#![allow(clippy::uninlined_format_args, clippy::disallowed_names, clippy::impl_trait_param)]
3+
#![allow(clippy::uninlined_format_args, clippy::disallowed_names, clippy::impl_trait_in_params)]
44

55
use std::fmt::Display;
66

0 commit comments

Comments
 (0)