Skip to content

Commit 649cef0

Browse files
authored
rename MANUAL_DIV_CEIL MSRV alias and add missing conf info for manual_div_ceil (#14263)
- The name of an MSRV alias should describe its functionality, and it is not appropriate for it to be the same as the name of the lint that uses it. - Additionally, while `manual_div_ceil` allows setting MSRV, this is not correctly reflected in the configuration information. changelog: none
2 parents 1250c26 + 55f32d9 commit 649cef0

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

Diff for: book/src/lint_configuration.md

+1
Original file line numberDiff line numberDiff line change
@@ -765,6 +765,7 @@ The minimum rust version that the project supports. Defaults to the `rust-versio
765765
* [`manual_bits`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_bits)
766766
* [`manual_c_str_literals`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals)
767767
* [`manual_clamp`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp)
768+
* [`manual_div_ceil`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil)
768769
* [`manual_flatten`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten)
769770
* [`manual_hash_one`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_hash_one)
770771
* [`manual_is_ascii_check`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check)

Diff for: clippy_config/src/conf.rs

+1
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,7 @@ define_Conf! {
620620
manual_bits,
621621
manual_c_str_literals,
622622
manual_clamp,
623+
manual_div_ceil,
623624
manual_flatten,
624625
manual_hash_one,
625626
manual_is_ascii_check,

Diff for: clippy_lints/src/manual_div_ceil.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ impl_lint_pass!(ManualDivCeil => [MANUAL_DIV_CEIL]);
5959

6060
impl<'tcx> LateLintPass<'tcx> for ManualDivCeil {
6161
fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &Expr<'_>) {
62-
if !self.msrv.meets(msrvs::MANUAL_DIV_CEIL) {
62+
if !self.msrv.meets(msrvs::DIV_CEIL) {
6363
return;
6464
}
6565

Diff for: clippy_utils/src/msrvs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ msrv_aliases! {
2828
1,76,0 { PTR_FROM_REF, OPTION_RESULT_INSPECT }
2929
1,75,0 { OPTION_AS_SLICE }
3030
1,74,0 { REPR_RUST }
31-
1,73,0 { MANUAL_DIV_CEIL }
31+
1,73,0 { DIV_CEIL }
3232
1,71,0 { TUPLE_ARRAY_CONVERSIONS, BUILD_HASHER_HASH_ONE }
3333
1,70,0 { OPTION_RESULT_IS_VARIANT_AND, BINARY_HEAP_RETAIN }
3434
1,68,0 { PATH_MAIN_SEPARATOR_STR }

0 commit comments

Comments
 (0)