Skip to content

Commit 4a2a27d

Browse files
committed
Added the 's' to the end of the lint name
1 parent a3e7b36 commit 4a2a27d

7 files changed

+13
-13
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3969,7 +3969,7 @@ Released 2018-09-13
39693969
[`unit_hash`]: https://rust-lang.github.io/rust-clippy/master/index.html#unit_hash
39703970
[`unit_return_expecting_ord`]: https://rust-lang.github.io/rust-clippy/master/index.html#unit_return_expecting_ord
39713971
[`unknown_clippy_lints`]: https://rust-lang.github.io/rust-clippy/master/index.html#unknown_clippy_lints
3972-
[`unnecessary_box_return`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_box_return
3972+
[`unnecessary_box_returns`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_box_returns
39733973
[`unnecessary_cast`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
39743974
[`unnecessary_filter_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_filter_map
39753975
[`unnecessary_find_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_find_map

clippy_lints/src/lib.register_lints.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ store.register_lints(&[
560560
unit_types::UNIT_CMP,
561561
unnamed_address::FN_ADDRESS_COMPARISONS,
562562
unnamed_address::VTABLE_ADDRESS_COMPARISONS,
563-
unnecessary_box_return::UNNECESSARY_BOX_RETURN,
563+
unnecessary_box_returns::UNNECESSARY_BOX_RETURNS,
564564
unnecessary_owned_empty_strings::UNNECESSARY_OWNED_EMPTY_STRINGS,
565565
unnecessary_self_imports::UNNECESSARY_SELF_IMPORTS,
566566
unnecessary_sort_by::UNNECESSARY_SORT_BY,

clippy_lints/src/lib.register_nursery.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ store.register_group(true, "clippy::nursery", Some("clippy_nursery"), vec![
3131
LintId::of(trait_bounds::TRAIT_DUPLICATION_IN_BOUNDS),
3232
LintId::of(trait_bounds::TYPE_REPETITION_IN_BOUNDS),
3333
LintId::of(transmute::TRANSMUTE_UNDEFINED_REPR),
34-
LintId::of(unnecessary_box_return::UNNECESSARY_BOX_RETURN),
34+
LintId::of(unnecessary_box_returns::UNNECESSARY_BOX_RETURNS),
3535
LintId::of(unused_rounding::UNUSED_ROUNDING),
3636
LintId::of(use_self::USE_SELF),
3737
])

clippy_lints/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ mod unit_hash;
387387
mod unit_return_expecting_ord;
388388
mod unit_types;
389389
mod unnamed_address;
390-
mod unnecessary_box_return;
390+
mod unnecessary_box_returns;
391391
mod unnecessary_owned_empty_strings;
392392
mod unnecessary_self_imports;
393393
mod unnecessary_sort_by;
@@ -931,7 +931,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
931931
store.register_late_pass(|| Box::new(invalid_utf8_in_unchecked::InvalidUtf8InUnchecked));
932932
store.register_late_pass(|| Box::new(std_instead_of_core::StdReexports::default()));
933933
store.register_late_pass(|| Box::new(std_instead_of_core::StdReexports));
934-
store.register_late_pass(|| Box::new(unnecessary_box_return::UnnecessaryBoxReturn));
934+
store.register_late_pass(|| Box::new(unnecessary_box_returns::UnnecessaryBoxReturns));
935935
// add lints here, do not remove this comment, it's used in `new_lint`
936936
}
937937

clippy_lints/src/unnecessary_box_return.rs renamed to clippy_lints/src/unnecessary_box_returns.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ declare_clippy_lint! {
3030
/// }
3131
/// ```
3232
#[clippy::version = "1.64.0"]
33-
pub UNNECESSARY_BOX_RETURN,
33+
pub UNNECESSARY_BOX_RETURNS,
3434
nursery,
3535
"Needlessly returning a Box"
3636
}
37-
declare_lint_pass!(UnnecessaryBoxReturn => [UNNECESSARY_BOX_RETURN]);
37+
declare_lint_pass!(UnnecessaryBoxReturns => [UNNECESSARY_BOX_RETURNS]);
3838

39-
impl LateLintPass<'_> for UnnecessaryBoxReturn {
39+
impl LateLintPass<'_> for UnnecessaryBoxReturns {
4040
fn check_fn(
4141
&mut self,
4242
cx: &LateContext<'_>,
@@ -68,7 +68,7 @@ impl LateLintPass<'_> for UnnecessaryBoxReturn {
6868
if implements_trait(cx, boxed_ty, sized_trait, &[]) {
6969
span_lint_and_sugg(
7070
cx,
71-
UNNECESSARY_BOX_RETURN,
71+
UNNECESSARY_BOX_RETURNS,
7272
return_ty_hir.span,
7373
format!("function returns `Box<{0}>` when `{0}` implements `Sized`", boxed_ty).as_str(),
7474
"change the return type to",

tests/ui/unnecessary_box_return.rs renamed to tests/ui/unnecessary_box_returns.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![warn(clippy::unnecessary_box_return)]
1+
#![warn(clippy::unnecessary_box_returns)]
22

33
struct Foo {}
44

tests/ui/unnecessary_box_return.stderr renamed to tests/ui/unnecessary_box_returns.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error: function returns `Box<usize>` when `usize` implements `Sized`
2-
--> $DIR/unnecessary_box_return.rs:6:21
2+
--> $DIR/unnecessary_box_returns.rs:6:21
33
|
44
LL | fn boxed_usize() -> Box<usize> {
55
| ^^^^^^^^^^ help: change the return type to: `usize`
66
|
7-
= note: `-D clippy::unnecessary-box-return` implied by `-D warnings`
7+
= note: `-D clippy::unnecessary-box-returns` implied by `-D warnings`
88

99
error: function returns `Box<Foo>` when `Foo` implements `Sized`
10-
--> $DIR/unnecessary_box_return.rs:11:19
10+
--> $DIR/unnecessary_box_returns.rs:11:19
1111
|
1212
LL | fn boxed_foo() -> Box<Foo> {
1313
| ^^^^^^^^ help: change the return type to: `Foo`

0 commit comments

Comments
 (0)