Auto merge of #86130 - BoxyUwU:abstract_const_as_cast, r=oli-obk
const_eval_checked: Support as casts in abstract consts
This commit is contained in:
commit
d59b80d588
10 changed files with 313 additions and 3 deletions
|
@ -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)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue