errooaaar~
This commit is contained in:
parent
d2731d8e93
commit
f97e075e92
11 changed files with 146 additions and 113 deletions
|
@ -18,3 +18,20 @@ pub enum Node<'tcx> {
|
|||
UnaryOp(mir::UnOp, NodeId),
|
||||
FunctionCall(NodeId, &'tcx [NodeId]),
|
||||
}
|
||||
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, HashStable, TyEncodable, TyDecodable)]
|
||||
pub enum NotConstEvaluatable {
|
||||
Error(rustc_errors::ErrorReported),
|
||||
MentionsInfer,
|
||||
MentionsParam,
|
||||
}
|
||||
|
||||
impl From<rustc_errors::ErrorReported> for NotConstEvaluatable {
|
||||
fn from(e: rustc_errors::ErrorReported) -> NotConstEvaluatable {
|
||||
NotConstEvaluatable::Error(e)
|
||||
}
|
||||
}
|
||||
|
||||
TrivialTypeFoldableAndLiftImpls! {
|
||||
NotConstEvaluatable,
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ pub mod specialization_graph;
|
|||
mod structural_impls;
|
||||
|
||||
use crate::infer::canonical::Canonical;
|
||||
use crate::mir::interpret::ErrorHandled;
|
||||
use crate::mir::abstract_const::NotConstEvaluatable;
|
||||
use crate::ty::subst::SubstsRef;
|
||||
use crate::ty::{self, AdtKind, Ty, TyCtxt};
|
||||
|
||||
|
@ -398,7 +398,7 @@ pub enum SelectionError<'tcx> {
|
|||
ty::error::TypeError<'tcx>,
|
||||
),
|
||||
TraitNotObjectSafe(DefId),
|
||||
ConstEvalFailure(ErrorHandled),
|
||||
NotConstEvaluatable(NotConstEvaluatable),
|
||||
Overflow,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue