From a36d386c6d08b6afbaf8316242218d9644b2ab82 Mon Sep 17 00:00:00 2001 From: varkor Date: Wed, 20 Feb 2019 01:10:03 +0000 Subject: [PATCH] Add ConstVid Co-Authored-By: Gabriel Smith --- src/librustc/ty/sty.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/librustc/ty/sty.rs b/src/librustc/ty/sty.rs index 2f77ad2f1803..afe3dc2300a8 100644 --- a/src/librustc/ty/sty.rs +++ b/src/librustc/ty/sty.rs @@ -16,6 +16,7 @@ use crate::mir::interpret::{Scalar, Pointer}; use smallvec::SmallVec; use std::iter; use std::cmp::Ordering; +use std::marker::PhantomData; use rustc_target::spec::abi; use syntax::ast::{self, Ident}; use syntax::symbol::{keywords, InternedString}; @@ -1249,6 +1250,12 @@ pub struct TyVid { pub index: u32, } +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, RustcEncodable, RustcDecodable)] +pub struct ConstVid<'tcx> { + pub index: u32, + pub phantom: PhantomData<&'tcx ()>, +} + #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, RustcEncodable, RustcDecodable)] pub struct IntVid { pub index: u32,