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