X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_trait_selection%2Fsrc%2Ftraits%2Fconst_evaluatable.rs;h=7c9fde27420bc2b12ba79a6d08083b507dc2b8ec;hb=5af04471aacadf650c23eed54b70fbe04e2230c2;hp=7cc0999478a3eddf3aeff66d0c868647ba38cf9d;hpb=ec28f5338b8e54fa8ae3c18bf101c809c337f1f5;p=rust.git diff --git a/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs b/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs index 7cc0999478a..7c9fde27420 100644 --- a/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs +++ b/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs @@ -30,7 +30,7 @@ pub fn is_const_evaluatable<'tcx>( span: Span, ) -> Result<(), NotConstEvaluatable> { let tcx = infcx.tcx; - match unexpanded_ct.kind() { + match tcx.expand_abstract_consts(unexpanded_ct).kind() { ty::ConstKind::Unevaluated(_) | ty::ConstKind::Expr(_) => (), ty::ConstKind::Param(_) | ty::ConstKind::Bound(_, _)