fn check_impl_constness( tcx: TyCtxt<'_>, is_const: bool, hir_trait_ref: &TraitRef<'_>, ) -> Option<ErrorGuaranteed>