From 8af3f221899e3e8af8f8e4290fafbbd60b9955d6 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Sun, 24 Mar 2024 12:26:20 -0400 Subject: [PATCH] Remove TypeVariableOriginKind::OpaqueInference --- compiler/rustc_infer/src/infer/opaque_types/mod.rs | 2 +- compiler/rustc_infer/src/infer/type_variable.rs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/rustc_infer/src/infer/opaque_types/mod.rs b/compiler/rustc_infer/src/infer/opaque_types/mod.rs index 02b8ded285f6d..01430e830e556 100644 --- a/compiler/rustc_infer/src/infer/opaque_types/mod.rs +++ b/compiler/rustc_infer/src/infer/opaque_types/mod.rs @@ -73,7 +73,7 @@ impl<'tcx> InferCtxt<'tcx> { // for opaque types, and then use that kind to fix the spans for type errors // that we see later on. let ty_var = self.next_ty_var(TypeVariableOrigin { - kind: TypeVariableOriginKind::OpaqueTypeInference(def_id), + kind: TypeVariableOriginKind::MiscVariable, span, }); obligations.extend( diff --git a/compiler/rustc_infer/src/infer/type_variable.rs b/compiler/rustc_infer/src/infer/type_variable.rs index 3630b0f439ff4..55c6c92a58483 100644 --- a/compiler/rustc_infer/src/infer/type_variable.rs +++ b/compiler/rustc_infer/src/infer/type_variable.rs @@ -47,7 +47,6 @@ pub enum TypeVariableOriginKind { MiscVariable, NormalizeProjectionType, TypeInference, - OpaqueTypeInference(DefId), TypeParameterDefinition(Symbol, DefId), /// One of the upvars or closure kind parameters in a `ClosureArgs`