Remove ConstVariableOriginKind

This commit is contained in:
Michael Goulet
2024-03-24 18:52:03 -04:00
parent 34bce07e8e
commit eb6f856169
10 changed files with 26 additions and 63 deletions

View File

@@ -1,7 +1,6 @@
use crate::ty::{self, Ty, TyCtxt};
use rustc_data_structures::unify::{NoError, UnifyKey, UnifyValue};
use rustc_span::def_id::DefId;
use rustc_span::symbol::Symbol;
use rustc_span::Span;
use std::cmp;
use std::marker::PhantomData;
@@ -106,16 +105,9 @@ impl ToType for ty::FloatVarValue {
#[derive(Copy, Clone, Debug)]
pub struct ConstVariableOrigin {
pub kind: ConstVariableOriginKind,
pub span: Span,
}
/// Reasons to create a const inference variable
#[derive(Copy, Clone, Debug)]
pub enum ConstVariableOriginKind {
MiscVariable,
ConstInference,
ConstParameterDefinition(Symbol, DefId),
// `DefId` of the const parameter this was instantiated for, if any.
pub param_def_id: Option<DefId>,
}
#[derive(Copy, Clone, Debug)]