rust/compiler/rustc_smir/src/stable_mir/ty.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
328 B
Rust
Raw Normal View History

2023-04-24 01:04:44 +00:00
use super::with;
#[derive(Copy, Clone, Debug)]
pub struct Ty(pub usize);
impl Ty {
pub fn kind(&self) -> TyKind {
with(|context| context.ty_kind(*self))
}
}
2023-07-05 21:50:13 +00:00
#[derive(Clone, Debug)]
2023-04-24 01:04:44 +00:00
pub enum TyKind {
RigidTy(RigidTy),
}
2023-07-05 21:50:13 +00:00
#[derive(Clone, Debug)]
pub enum RigidTy {
2023-04-24 01:04:44 +00:00
Bool,
2023-07-05 22:01:11 +00:00
Char,
2023-04-24 01:04:44 +00:00
Tuple(Vec<Ty>),
}