remove builtin impl for float and int infer

This commit is contained in:
lcnr 2023-08-11 19:08:11 +02:00
parent 08691f0c92
commit bb76fde734
2 changed files with 4 additions and 9 deletions

View File

@ -161,14 +161,12 @@ pub(in crate::solve) fn instantiate_constituent_tys_for_copy_clone_trait<'tcx>(
ty: Ty<'tcx>, ty: Ty<'tcx>,
) -> Result<Vec<Ty<'tcx>>, NoSolution> { ) -> Result<Vec<Ty<'tcx>>, NoSolution> {
match *ty.kind() { match *ty.kind() {
ty::Infer(ty::IntVar(_) | ty::FloatVar(_)) ty::FnDef(..) | ty::FnPtr(_) | ty::Error(_) => Ok(vec![]),
| ty::FnDef(..)
| ty::FnPtr(_)
| ty::Error(_) => Ok(vec![]),
// Implementations are provided in core // Implementations are provided in core
ty::Uint(_) ty::Uint(_)
| ty::Int(_) | ty::Int(_)
| ty::Infer(ty::IntVar(_) | ty::FloatVar(_))
| ty::Bool | ty::Bool
| ty::Float(_) | ty::Float(_)
| ty::Char | ty::Char

View File

@ -2118,14 +2118,11 @@ impl<'tcx> SelectionContext<'_, 'tcx> {
use self::BuiltinImplConditions::{Ambiguous, None, Where}; use self::BuiltinImplConditions::{Ambiguous, None, Where};
match *self_ty.kind() { match *self_ty.kind() {
ty::Infer(ty::IntVar(_)) ty::FnDef(..) | ty::FnPtr(_) | ty::Error(_) => Where(ty::Binder::dummy(Vec::new())),
| ty::Infer(ty::FloatVar(_))
| ty::FnDef(..)
| ty::FnPtr(_)
| ty::Error(_) => Where(ty::Binder::dummy(Vec::new())),
ty::Uint(_) ty::Uint(_)
| ty::Int(_) | ty::Int(_)
| ty::Infer(ty::IntVar(_) | ty::FloatVar(_))
| ty::Bool | ty::Bool
| ty::Float(_) | ty::Float(_)
| ty::Char | ty::Char