Skip to content

Commit d38175f

Browse files
committed
explicit_ty_bound code golf
1 parent 36b2685 commit d38175f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clippy_lints/src/default_numeric_fallback.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,9 @@ impl<'a, 'tcx> NumericFallbackVisitor<'a, 'tcx> {
8888
fn check_lit(&self, lit: &Lit, lit_ty: Ty<'tcx>, emit_hir_id: HirId) {
8989
if_chain! {
9090
if !in_external_macro(self.cx.sess(), lit.span);
91-
if let Some(explicit_ty_bounds) = self.ty_bounds.last();
91+
if matches!(self.ty_bounds.last(), Some(ExplicitTyBound(false)));
9292
if matches!(lit.node,
9393
LitKind::Int(_, LitIntType::Unsuffixed) | LitKind::Float(_, LitFloatType::Unsuffixed));
94-
if !explicit_ty_bounds.0;
9594
then {
9695
let (suffix, is_float) = match lit_ty.kind() {
9796
ty::Int(IntTy::I32) => ("i32", false),

0 commit comments

Comments
 (0)