]> git.proxmox.com Git - rustc.git/blobdiff - compiler/rustc_typeck/src/constrained_generic_params.rs
New upstream version 1.63.0+dfsg1
[rustc.git] / compiler / rustc_typeck / src / constrained_generic_params.rs
index 7f2e57e61098f1c306c78851b916582efc47253f..858cf63390a34f1cf8dad568dcf20233727f64cc 100644 (file)
@@ -1,5 +1,5 @@
 use rustc_data_structures::fx::FxHashSet;
-use rustc_middle::ty::fold::{TypeFoldable, TypeVisitor};
+use rustc_middle::ty::fold::{TypeFoldable, TypeSuperFoldable, TypeVisitor};
 use rustc_middle::ty::{self, Ty, TyCtxt};
 use rustc_span::source_map::Span;
 use std::ops::ControlFlow;
@@ -80,7 +80,7 @@ impl<'tcx> TypeVisitor<'tcx> for ParameterCollector {
     }
 
     fn visit_const(&mut self, c: ty::Const<'tcx>) -> ControlFlow<Self::BreakTy> {
-        match c.val() {
+        match c.kind() {
             ty::ConstKind::Unevaluated(..) if !self.include_nonconstraining => {
                 // Constant expressions are not injective
                 return c.ty().visit_with(self);