Remove unnecessary StructurallyRelateAliases from CombineFields/TypeRelating
This commit is contained in:
parent
3da257a98d
commit
30a2ecddb4
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::infer::relate::type_relating::TypeRelating;
|
use crate::infer::relate::type_relating::TypeRelating;
|
||||||
use crate::infer::relate::{Relate, StructurallyRelateAliases, TypeRelation};
|
use crate::infer::relate::{Relate, TypeRelation};
|
||||||
|
|
||||||
/// Whether we should define opaque types or just treat them opaquely.
|
/// Whether we should define opaque types or just treat them opaquely.
|
||||||
///
|
///
|
||||||
@ -114,7 +114,6 @@ pub fn sup<T>(
|
|||||||
ToTrace::to_trace(self.cause, expected, actual),
|
ToTrace::to_trace(self.cause, expected, actual),
|
||||||
self.param_env,
|
self.param_env,
|
||||||
define_opaque_types,
|
define_opaque_types,
|
||||||
StructurallyRelateAliases::No,
|
|
||||||
ty::Contravariant,
|
ty::Contravariant,
|
||||||
);
|
);
|
||||||
op.relate(expected, actual)?;
|
op.relate(expected, actual)?;
|
||||||
@ -136,7 +135,6 @@ pub fn sub<T>(
|
|||||||
ToTrace::to_trace(self.cause, expected, actual),
|
ToTrace::to_trace(self.cause, expected, actual),
|
||||||
self.param_env,
|
self.param_env,
|
||||||
define_opaque_types,
|
define_opaque_types,
|
||||||
StructurallyRelateAliases::No,
|
|
||||||
ty::Covariant,
|
ty::Covariant,
|
||||||
);
|
);
|
||||||
op.relate(expected, actual)?;
|
op.relate(expected, actual)?;
|
||||||
@ -177,7 +175,6 @@ pub fn eq_trace<T>(
|
|||||||
trace,
|
trace,
|
||||||
self.param_env,
|
self.param_env,
|
||||||
define_opaque_types,
|
define_opaque_types,
|
||||||
StructurallyRelateAliases::No,
|
|
||||||
ty::Invariant,
|
ty::Invariant,
|
||||||
);
|
);
|
||||||
op.relate(expected, actual)?;
|
op.relate(expected, actual)?;
|
||||||
|
@ -21,7 +21,6 @@ pub(crate) struct TypeRelating<'infcx, 'tcx> {
|
|||||||
trace: TypeTrace<'tcx>,
|
trace: TypeTrace<'tcx>,
|
||||||
param_env: ty::ParamEnv<'tcx>,
|
param_env: ty::ParamEnv<'tcx>,
|
||||||
define_opaque_types: DefineOpaqueTypes,
|
define_opaque_types: DefineOpaqueTypes,
|
||||||
structurally_relate_aliases: StructurallyRelateAliases,
|
|
||||||
|
|
||||||
// Mutable fields.
|
// Mutable fields.
|
||||||
ambient_variance: ty::Variance,
|
ambient_variance: ty::Variance,
|
||||||
@ -57,7 +56,6 @@ pub(crate) fn new(
|
|||||||
trace: TypeTrace<'tcx>,
|
trace: TypeTrace<'tcx>,
|
||||||
param_env: ty::ParamEnv<'tcx>,
|
param_env: ty::ParamEnv<'tcx>,
|
||||||
define_opaque_types: DefineOpaqueTypes,
|
define_opaque_types: DefineOpaqueTypes,
|
||||||
structurally_relate_aliases: StructurallyRelateAliases,
|
|
||||||
ambient_variance: ty::Variance,
|
ambient_variance: ty::Variance,
|
||||||
) -> TypeRelating<'infcx, 'tcx> {
|
) -> TypeRelating<'infcx, 'tcx> {
|
||||||
TypeRelating {
|
TypeRelating {
|
||||||
@ -65,7 +63,6 @@ pub(crate) fn new(
|
|||||||
trace,
|
trace,
|
||||||
param_env,
|
param_env,
|
||||||
define_opaque_types,
|
define_opaque_types,
|
||||||
structurally_relate_aliases,
|
|
||||||
ambient_variance,
|
ambient_variance,
|
||||||
obligations: vec![],
|
obligations: vec![],
|
||||||
cache: Default::default(),
|
cache: Default::default(),
|
||||||
@ -353,7 +350,7 @@ fn param_env(&self) -> ty::ParamEnv<'tcx> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn structurally_relate_aliases(&self) -> StructurallyRelateAliases {
|
fn structurally_relate_aliases(&self) -> StructurallyRelateAliases {
|
||||||
self.structurally_relate_aliases
|
StructurallyRelateAliases::No
|
||||||
}
|
}
|
||||||
|
|
||||||
fn register_predicates(
|
fn register_predicates(
|
||||||
|
Loading…
Reference in New Issue
Block a user