Skip to content

Commit

Permalink
fixme and ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
bend-n committed Feb 12, 2025
1 parent bfa8563 commit 409e372
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_lint_defs/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ declare_lint_pass! {
PROC_MACRO_DERIVE_RESOLUTION_FALLBACK,
PTR_CAST_ADD_AUTO_TO_OBJECT,
PTR_TO_INTEGER_TRANSMUTE_IN_CONSTS,
REDUNDANT_TRANSMUTATION,
PUB_USE_OF_PRIVATE_EXTERN_CRATE,
REDUNDANT_IMPORTS,
REDUNDANT_LIFETIMES,
REDUNDANT_TRANSMUTATION,
REFINING_IMPL_TRAIT_INTERNAL,
REFINING_IMPL_TRAIT_REACHABLE,
RENAMED_AND_REMOVED_LINTS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ impl<'a, 'tcx> RedundantTransmutesChecker<'a, 'tcx> {
// bool → (uNN ↔ iNN)
Bool | Uint(..) | Int(..) => {
matches!(fn_sig.output().kind(), Int(..) | Uint(..)).then(|| {
// FIXME: suggest `cast_unsigned`/ `cast_signed` when `integer_sign_cast` stabilizes
errors::RedundantTransmute {
sugg: format!("({arg}) as {}", fn_sig.output()),
help: None,
Expand Down

0 comments on commit 409e372

Please sign in to comment.