@@ -10,7 +10,7 @@ mod cast_ptr_alignment;
10
10
mod cast_ref_to_mut;
11
11
mod cast_sign_loss;
12
12
mod cast_slice_different_sizes;
13
- mod cast_slice_reference_from_raw_parts ;
13
+ mod cast_slice_from_raw_parts ;
14
14
mod char_lit_as_u8;
15
15
mod fn_to_numeric_cast;
16
16
mod fn_to_numeric_cast_any;
@@ -590,7 +590,7 @@ declare_clippy_lint! {
590
590
/// ```
591
591
/// [safety requirements]: https://doc.rust-lang.org/std/slice/fn.from_raw_parts.html#safety
592
592
#[ clippy:: version = "1.64.0" ]
593
- pub CAST_SLICE_REFERENCE_FROM_RAW_PARTS ,
593
+ pub CAST_SLICE_FROM_RAW_PARTS ,
594
594
suspicious,
595
595
"casting a slice created from a pointer and length to a slice pointer"
596
596
}
@@ -628,6 +628,7 @@ impl_lint_pass!(Casts => [
628
628
BORROW_AS_PTR ,
629
629
RAW_SLICE_POINTER_CAST
630
630
CAST_SLICE_REFERENCE_FROM_RAW_PARTS
631
+ CAST_SLICE_FROM_RAW_PARTS
631
632
] ) ;
632
633
633
634
impl < ' tcx > LateLintPass < ' tcx > for Casts {
@@ -652,7 +653,7 @@ impl<'tcx> LateLintPass<'tcx> for Casts {
652
653
if unnecessary_cast:: check ( cx, expr, cast_expr, cast_from, cast_to) {
653
654
return ;
654
655
}
655
- cast_slice_reference_from_raw_parts :: check ( cx, expr, cast_expr, cast_to, self . msrv ) ;
656
+ cast_slice_from_raw_parts :: check ( cx, expr, cast_expr, cast_to, self . msrv ) ;
656
657
fn_to_numeric_cast_any:: check ( cx, expr, cast_expr, cast_from, cast_to) ;
657
658
fn_to_numeric_cast:: check ( cx, expr, cast_expr, cast_from, cast_to) ;
658
659
fn_to_numeric_cast_with_truncation:: check ( cx, expr, cast_expr, cast_from, cast_to) ;
0 commit comments