diff --git a/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs b/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs
index c79b2624f8cb0..5f6d8ac751e26 100644
--- a/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs
+++ b/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs
@@ -85,8 +85,10 @@ pub fn is_const_evaluatable<'cx, 'tcx>(
} else if leaf.has_param_types_or_consts() {
failure_kind = cmp::min(failure_kind, FailureKind::MentionsParam);
}
+
+ false
}
- Node::Binop(_, _, _) | Node::UnaryOp(_, _) | Node::FunctionCall(_, _) => (),
+ Node::Binop(_, _, _) | Node::UnaryOp(_, _) | Node::FunctionCall(_, _) => false,
});
match failure_kind {
@@ -194,12 +196,12 @@ pub fn is_const_evaluatable<'cx, 'tcx>(
///
/// This is only able to represent a subset of `MIR`,
/// and should not leak any information about desugarings.
-#[derive(Clone, Copy)]
+#[derive(Debug, Clone, Copy)]
pub struct AbstractConst<'tcx> {
// FIXME: Consider adding something like `IndexSlice`
// and use this here.
- inner: &'tcx [Node<'tcx>],
- substs: SubstsRef<'tcx>,
+ pub inner: &'tcx [Node<'tcx>],
+ pub substs: SubstsRef<'tcx>,
}
impl AbstractConst<'tcx> {
@@ -209,9 +211,21 @@ impl AbstractConst<'tcx> {
substs: SubstsRef<'tcx>,
) -> Result