diff options
| author | Ellen <supbscripter@gmail.com> | 2021-06-08 08:02:12 +0100 |
|---|---|---|
| committer | Ellen <supbscripter@gmail.com> | 2021-06-08 08:02:16 +0100 |
| commit | 8e7299dfcd4628965b58da10ec7393ab8f2c7e14 (patch) | |
| tree | 8f0c7f3507f40652edc1971ef3fa7a35141e6815 /compiler/rustc_middle/src | |
| parent | dda4a881e006c808093543eece098565c3142c46 (diff) | |
| download | rust-8e7299dfcd4628965b58da10ec7393ab8f2c7e14.tar.gz rust-8e7299dfcd4628965b58da10ec7393ab8f2c7e14.zip | |
Support as casts in abstract consts
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/mir/abstract_const.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/mir/abstract_const.rs b/compiler/rustc_middle/src/mir/abstract_const.rs index 776a777b1bd..1ef10241143 100644 --- a/compiler/rustc_middle/src/mir/abstract_const.rs +++ b/compiler/rustc_middle/src/mir/abstract_const.rs @@ -1,6 +1,6 @@ //! A subset of a mir body used for const evaluatability checking. -use crate::mir; -use crate::ty; +use crate::mir::{self, CastKind}; +use crate::ty::{self, Ty}; rustc_index::newtype_index! { /// An index into an `AbstractConst`. @@ -17,6 +17,7 @@ pub enum Node<'tcx> { Binop(mir::BinOp, NodeId, NodeId), UnaryOp(mir::UnOp, NodeId), FunctionCall(NodeId, &'tcx [NodeId]), + Cast(CastKind, NodeId, Ty<'tcx>), } #[derive(Debug, Copy, Clone, PartialEq, Eq, HashStable, TyEncodable, TyDecodable)] |
