From 2fd874d0d5ec1618e488d0d10b8b67553aeaaf1e Mon Sep 17 00:00:00 2001 From: Giacomo Stevanato Date: Tue, 3 Aug 2021 13:18:06 +0200 Subject: [PATCH] Fix overflow when calculating expected_min in generics diagnostics --- compiler/rustc_typeck/src/astconv/generics.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/compiler/rustc_typeck/src/astconv/generics.rs b/compiler/rustc_typeck/src/astconv/generics.rs index 9e700d9e8d8..64a6049ec52 100644 --- a/compiler/rustc_typeck/src/astconv/generics.rs +++ b/compiler/rustc_typeck/src/astconv/generics.rs @@ -613,7 +613,6 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { param_counts.consts + named_type_param_count - default_counts.types - default_counts.consts - - synth_type_param_count }; debug!("expected_min: {:?}", expected_min); debug!("arg_counts.lifetimes: {:?}", gen_args.num_lifetime_params());