summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_infer/src/infer/sub.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_infer/src/infer/sub.rs')
-rw-r--r--compiler/rustc_infer/src/infer/sub.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_infer/src/infer/sub.rs b/compiler/rustc_infer/src/infer/sub.rs
index ceafafb55..27e1ed56f 100644
--- a/compiler/rustc_infer/src/infer/sub.rs
+++ b/compiler/rustc_infer/src/infer/sub.rs
@@ -118,7 +118,7 @@ impl<'tcx> TypeRelation<'tcx> for Sub<'_, '_, 'tcx> {
(&ty::Error(e), _) | (_, &ty::Error(e)) => {
infcx.set_tainted_by_errors(e);
- Ok(self.tcx().ty_error(e))
+ Ok(Ty::new_error(self.tcx(), e))
}
(
@@ -132,7 +132,7 @@ impl<'tcx> TypeRelation<'tcx> for Sub<'_, '_, 'tcx> {
| (_, &ty::Alias(ty::Opaque, ty::AliasTy { def_id, .. }))
if self.fields.define_opaque_types == DefineOpaqueTypes::Yes
&& def_id.is_local()
- && !self.tcx().trait_solver_next() =>
+ && !self.fields.infcx.next_trait_solver() =>
{
self.fields.obligations.extend(
infcx