Set unnecessary_cast suggestion to MaybeIncorrect for pointer casts
Removing casts may cause type inference to stop working which requires manual intervention
This commit is contained in:
parent
26edd5a2ab
commit
ea36a9df75
3 changed files with 39 additions and 1 deletions
|
|
@ -56,7 +56,7 @@ pub(super) fn check<'tcx>(
|
|||
&format!("casting raw pointers to the same type and constness is unnecessary (`{cast_from}` -> `{cast_to}`)"),
|
||||
"try",
|
||||
cast_str.clone(),
|
||||
Applicability::MachineApplicable,
|
||||
Applicability::MaybeIncorrect,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue