Fix misaligned_transmute lint
This is done by adding two new lints: cast_ptr_alignment and transmute_ptr_to_ptr. These will replace misaligned_transmute.
This commit is contained in:
@@ -641,12 +641,14 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) {
|
||||
transmute::TRANSMUTE_INT_TO_CHAR,
|
||||
transmute::TRANSMUTE_INT_TO_FLOAT,
|
||||
transmute::TRANSMUTE_PTR_TO_REF,
|
||||
transmute::TRANSMUTE_PTR_TO_PTR,
|
||||
transmute::USELESS_TRANSMUTE,
|
||||
transmute::WRONG_TRANSMUTE,
|
||||
types::ABSURD_EXTREME_COMPARISONS,
|
||||
types::BORROWED_BOX,
|
||||
types::BOX_VEC,
|
||||
types::CAST_LOSSLESS,
|
||||
types::CAST_PTR_ALIGNMENT,
|
||||
types::CHAR_LIT_AS_U8,
|
||||
types::IMPLICIT_HASHER,
|
||||
types::LET_UNIT_VALUE,
|
||||
@@ -791,6 +793,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) {
|
||||
transmute::TRANSMUTE_INT_TO_CHAR,
|
||||
transmute::TRANSMUTE_INT_TO_FLOAT,
|
||||
transmute::TRANSMUTE_PTR_TO_REF,
|
||||
transmute::TRANSMUTE_PTR_TO_PTR,
|
||||
transmute::USELESS_TRANSMUTE,
|
||||
types::BORROWED_BOX,
|
||||
types::CAST_LOSSLESS,
|
||||
@@ -848,6 +851,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) {
|
||||
swap::ALMOST_SWAPPED,
|
||||
transmute::WRONG_TRANSMUTE,
|
||||
types::ABSURD_EXTREME_COMPARISONS,
|
||||
types::CAST_PTR_ALIGNMENT,
|
||||
types::UNIT_CMP,
|
||||
unicode::ZERO_WIDTH_SPACE,
|
||||
unused_io_amount::UNUSED_IO_AMOUNT,
|
||||
|
||||
Reference in New Issue
Block a user