Skip to content

Commit 30a2ecd

Browse files
Remove unnecessary StructurallyRelateAliases from CombineFields/TypeRelating
1 parent 3da257a commit 30a2ecd

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

Diff for: compiler/rustc_infer/src/infer/at.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use rustc_middle::ty::{Const, ImplSubject};
3131

3232
use super::*;
3333
use crate::infer::relate::type_relating::TypeRelating;
34-
use crate::infer::relate::{Relate, StructurallyRelateAliases, TypeRelation};
34+
use crate::infer::relate::{Relate, TypeRelation};
3535

3636
/// Whether we should define opaque types or just treat them opaquely.
3737
///
@@ -114,7 +114,6 @@ impl<'a, 'tcx> At<'a, 'tcx> {
114114
ToTrace::to_trace(self.cause, expected, actual),
115115
self.param_env,
116116
define_opaque_types,
117-
StructurallyRelateAliases::No,
118117
ty::Contravariant,
119118
);
120119
op.relate(expected, actual)?;
@@ -136,7 +135,6 @@ impl<'a, 'tcx> At<'a, 'tcx> {
136135
ToTrace::to_trace(self.cause, expected, actual),
137136
self.param_env,
138137
define_opaque_types,
139-
StructurallyRelateAliases::No,
140138
ty::Covariant,
141139
);
142140
op.relate(expected, actual)?;
@@ -177,7 +175,6 @@ impl<'a, 'tcx> At<'a, 'tcx> {
177175
trace,
178176
self.param_env,
179177
define_opaque_types,
180-
StructurallyRelateAliases::No,
181178
ty::Invariant,
182179
);
183180
op.relate(expected, actual)?;

Diff for: compiler/rustc_infer/src/infer/relate/type_relating.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ pub(crate) struct TypeRelating<'infcx, 'tcx> {
2121
trace: TypeTrace<'tcx>,
2222
param_env: ty::ParamEnv<'tcx>,
2323
define_opaque_types: DefineOpaqueTypes,
24-
structurally_relate_aliases: StructurallyRelateAliases,
2524

2625
// Mutable fields.
2726
ambient_variance: ty::Variance,
@@ -57,15 +56,13 @@ impl<'infcx, 'tcx> TypeRelating<'infcx, 'tcx> {
5756
trace: TypeTrace<'tcx>,
5857
param_env: ty::ParamEnv<'tcx>,
5958
define_opaque_types: DefineOpaqueTypes,
60-
structurally_relate_aliases: StructurallyRelateAliases,
6159
ambient_variance: ty::Variance,
6260
) -> TypeRelating<'infcx, 'tcx> {
6361
TypeRelating {
6462
infcx,
6563
trace,
6664
param_env,
6765
define_opaque_types,
68-
structurally_relate_aliases,
6966
ambient_variance,
7067
obligations: vec![],
7168
cache: Default::default(),
@@ -353,7 +350,7 @@ impl<'tcx> PredicateEmittingRelation<InferCtxt<'tcx>> for TypeRelating<'_, 'tcx>
353350
}
354351

355352
fn structurally_relate_aliases(&self) -> StructurallyRelateAliases {
356-
self.structurally_relate_aliases
353+
StructurallyRelateAliases::No
357354
}
358355

359356
fn register_predicates(

0 commit comments

Comments
 (0)