Skip to content

Commit 437014b

Browse files
authored
Update mention of ref_to_mut to invalid_reference_casting (rust-lang#14241)
This lint was renamed in 50da775. While I'm here convert the list of separate lints into a proper list for ease of use. changelog: none
2 parents 5e4d166 + 01085cb commit 437014b

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

clippy_lints/src/as_conversions.rs

+18-6
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,24 @@ declare_clippy_lint! {
99
/// Checks for usage of `as` conversions.
1010
///
1111
/// Note that this lint is specialized in linting *every single* use of `as`
12-
/// regardless of whether good alternatives exist or not.
13-
/// If you want more precise lints for `as`, please consider using these separate lints:
14-
/// `unnecessary_cast`, `cast_lossless/cast_possible_truncation/cast_possible_wrap/cast_precision_loss/cast_sign_loss`,
15-
/// `fn_to_numeric_cast(_with_truncation)`, `char_lit_as_u8`, `ref_to_mut` and `ptr_as_ptr`.
16-
/// There is a good explanation the reason why this lint should work in this way and how it is useful
17-
/// [in this issue](https://github.com/rust-lang/rust-clippy/issues/5122).
12+
/// regardless of whether good alternatives exist or not. If you want more
13+
/// precise lints for `as`, please consider using these separate lints:
14+
///
15+
/// - clippy::cast_lossless
16+
/// - clippy::cast_possible_truncation
17+
/// - clippy::cast_possible_wrap
18+
/// - clippy::cast_precision_loss
19+
/// - clippy::cast_sign_loss
20+
/// - clippy::char_lit_as_u8
21+
/// - clippy::fn_to_numeric_cast
22+
/// - clippy::fn_to_numeric_cast_with_truncation
23+
/// - clippy::ptr_as_ptr
24+
/// - clippy::unnecessary_cast
25+
/// - invalid_reference_casting
26+
///
27+
/// There is a good explanation the reason why this lint should work in this
28+
/// way and how it is useful [in this
29+
/// issue](https://github.com/rust-lang/rust-clippy/issues/5122).
1830
///
1931
/// ### Why restrict this?
2032
/// `as` conversions will perform many kinds of

0 commit comments

Comments
 (0)