Remove unnecessary StructurallyRelateAliases from CombineFields/TypeRelating
This commit is contained in:
parent
3da257a98d
commit
30a2ecddb4
2 changed files with 2 additions and 8 deletions
|
@ -31,7 +31,7 @@ use rustc_middle::ty::{Const, ImplSubject};
|
|||
|
||||
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 @@ impl<'a, 'tcx> At<'a, 'tcx> {
|
|||
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 @@ impl<'a, 'tcx> At<'a, 'tcx> {
|
|||
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 @@ impl<'a, 'tcx> At<'a, 'tcx> {
|
|||
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 @@ impl<'infcx, 'tcx> TypeRelating<'infcx, 'tcx> {
|
|||
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 @@ impl<'infcx, 'tcx> TypeRelating<'infcx, 'tcx> {
|
|||
trace,
|
||||
param_env,
|
||||
define_opaque_types,
|
||||
structurally_relate_aliases,
|
||||
ambient_variance,
|
||||
obligations: vec![],
|
||||
cache: Default::default(),
|
||||
|
@ -353,7 +350,7 @@ impl<'tcx> PredicateEmittingRelation<InferCtxt<'tcx>> for TypeRelating<'_, 'tcx>
|
|||
}
|
||||
|
||||
fn structurally_relate_aliases(&self) -> StructurallyRelateAliases {
|
||||
self.structurally_relate_aliases
|
||||
StructurallyRelateAliases::No
|
||||
}
|
||||
|
||||
fn register_predicates(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue