Skip to content

Commit 3cbd27b

Browse files
committed
remove superseded lints
1 parent 03a5b6b commit 3cbd27b

17 files changed

+103
-916
lines changed

clippy_lints/src/transmute/mod.rs

-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
mod crosspointer_transmute;
22
mod eager_transmute;
33
mod missing_transmute_annotations;
4-
mod transmute_float_to_int;
54
mod transmute_int_to_bool;
6-
mod transmute_int_to_char;
7-
mod transmute_int_to_float;
85
mod transmute_int_to_non_zero;
96
mod transmute_null_to_fn;
10-
mod transmute_num_to_bytes;
117
mod transmute_ptr_to_ptr;
128
mod transmute_ptr_to_ref;
139
mod transmute_ref_to_ref;
@@ -632,14 +628,10 @@ impl<'tcx> LateLintPass<'tcx> for Transmute {
632628
| transmute_null_to_fn::check(cx, e, arg, to_ty)
633629
| transmute_ptr_to_ref::check(cx, e, from_ty, to_ty, arg, path, self.msrv)
634630
| missing_transmute_annotations::check(cx, path, from_ty, to_ty, e.hir_id)
635-
| transmute_int_to_char::check(cx, e, from_ty, to_ty, arg, const_context)
636631
| transmute_ref_to_ref::check(cx, e, from_ty, to_ty, arg, const_context)
637632
| transmute_ptr_to_ptr::check(cx, e, from_ty, to_ty, arg, self.msrv)
638633
| transmute_int_to_bool::check(cx, e, from_ty, to_ty, arg)
639-
| transmute_int_to_float::check(cx, e, from_ty, to_ty, arg, const_context, self.msrv)
640634
| transmute_int_to_non_zero::check(cx, e, from_ty, to_ty, arg)
641-
| transmute_float_to_int::check(cx, e, from_ty, to_ty, arg, const_context, self.msrv)
642-
| transmute_num_to_bytes::check(cx, e, from_ty, to_ty, arg, const_context, self.msrv)
643635
| (unsound_collection_transmute::check(cx, e, from_ty, to_ty)
644636
|| transmute_undefined_repr::check(cx, e, from_ty, to_ty))
645637
| (eager_transmute::check(cx, e, arg, from_ty, to_ty));

clippy_lints/src/transmute/transmute_float_to_int.rs

-66
This file was deleted.

clippy_lints/src/transmute/transmute_int_to_char.rs

-47
This file was deleted.

clippy_lints/src/transmute/transmute_int_to_float.rs

-50
This file was deleted.

clippy_lints/src/transmute/transmute_num_to_bytes.rs

-50
This file was deleted.

tests/ui/rename.fixed

+4
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
#![allow(unused_labels)]
6464
#![allow(ambiguous_wide_pointer_comparisons)]
6565
#![allow(clippy::reversed_empty_ranges)]
66+
#![allow(unnecessary_transmutes)]
6667
#![warn(clippy::almost_complete_range)] //~ ERROR: lint `clippy::almost_complete_letter_range`
6768
#![warn(clippy::disallowed_names)] //~ ERROR: lint `clippy::blacklisted_name`
6869
#![warn(clippy::blocks_in_conditions)] //~ ERROR: lint `clippy::block_in_if_condition_expr`
@@ -132,5 +133,8 @@
132133
#![warn(unused_labels)] //~ ERROR: lint `clippy::unused_label`
133134
#![warn(ambiguous_wide_pointer_comparisons)] //~ ERROR: lint `clippy::vtable_address_comparisons`
134135
#![warn(clippy::reversed_empty_ranges)] //~ ERROR: lint `clippy::reverse_range_loop`
136+
#![warn(unnecessary_transmutes)] //~ ERROR: lint `clippy::transmute_float_to_int`
137+
#![warn(unnecessary_transmutes)] //~ ERROR: lint `clippy::transmute_int_to_char`
138+
#![warn(unnecessary_transmutes)] //~ ERROR: lint `clippy::transmute_int_to_float`
135139

136140
fn main() {}

0 commit comments

Comments
 (0)