Skip to content

Commit a36d386

Browse files
varkoryodaldevoid
andcommitted
Add ConstVid
Co-Authored-By: Gabriel Smith <[email protected]>
1 parent 11c31bb commit a36d386

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/librustc/ty/sty.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use crate::mir::interpret::{Scalar, Pointer};
1616
use smallvec::SmallVec;
1717
use std::iter;
1818
use std::cmp::Ordering;
19+
use std::marker::PhantomData;
1920
use rustc_target::spec::abi;
2021
use syntax::ast::{self, Ident};
2122
use syntax::symbol::{keywords, InternedString};
@@ -1249,6 +1250,12 @@ pub struct TyVid {
12491250
pub index: u32,
12501251
}
12511252

1253+
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, RustcEncodable, RustcDecodable)]
1254+
pub struct ConstVid<'tcx> {
1255+
pub index: u32,
1256+
pub phantom: PhantomData<&'tcx ()>,
1257+
}
1258+
12521259
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, RustcEncodable, RustcDecodable)]
12531260
pub struct IntVid {
12541261
pub index: u32,

0 commit comments

Comments
 (0)