Skip to content

Commit 4008b07

Browse files
committed
Enforce important cast-related lints.
1 parent 2fe1763 commit 4008b07

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/lib.rs

+18
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,24 @@
208208
#![no_std]
209209
#![warn(rust_2018_idioms, unused_lifetimes, missing_docs)]
210210
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
211+
#![deny(
212+
clippy::cast_lossless,
213+
clippy::cast_possible_truncation,
214+
clippy::cast_possible_wrap,
215+
clippy::cast_precision_loss,
216+
clippy::cast_ptr_alignment,
217+
clippy::cast_sign_loss,
218+
clippy::char_lit_as_u8,
219+
clippy::checked_conversions,
220+
clippy::fn_to_numeric_cast,
221+
clippy::fn_to_numeric_cast_with_truncation,
222+
clippy::ptr_as_ptr,
223+
clippy::unnecessary_cast,
224+
clippy::useless_conversion
225+
)]
226+
// `clippy::cast_ref_to_mut` was replaced by `invalid_reference_casting` in 1.73.
227+
#![allow(renamed_and_removed_lints)]
228+
#![deny(clippy::cast_ref_to_mut)]
211229

212230
#[macro_use]
213231
extern crate cfg_if;

0 commit comments

Comments
 (0)