]> git.lizzy.rs Git - rust.git/commitdiff
Add ConstVid
authorvarkor <github@varkor.com>
Wed, 20 Feb 2019 01:10:03 +0000 (01:10 +0000)
committervarkor <github@varkor.com>
Tue, 5 Mar 2019 22:07:37 +0000 (22:07 +0000)
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
src/librustc/ty/sty.rs

index 2f77ad2f180360004a79b356d75b9c32724f619b..afe3dc2300a8bc1d2f63c26a997b17ca9d405fce 100644 (file)
@@ -16,6 +16,7 @@
 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,