@@ -16,6 +16,7 @@ use crate::ty::{self, AdtKind, Ty, TyCtxt};
1616use rustc_errors:: { Applicability , DiagnosticBuilder } ;
1717use rustc_hir as hir;
1818use rustc_hir:: def_id:: DefId ;
19+ use rustc_hir:: Constness ;
1920use rustc_span:: symbol:: Symbol ;
2021use rustc_span:: { Span , DUMMY_SP } ;
2122use smallvec:: SmallVec ;
@@ -457,7 +458,7 @@ pub enum ImplSource<'tcx, N> {
457458 /// for some type parameter. The `Vec<N>` represents the
458459 /// obligations incurred from normalizing the where-clause (if
459460 /// any).
460- Param ( Vec < N > ) ,
461+ Param ( Vec < N > , Constness ) ,
461462
462463 /// Virtual calls through an object.
463464 Object ( ImplSourceObjectData < ' tcx , N > ) ,
@@ -487,7 +488,7 @@ impl<'tcx, N> ImplSource<'tcx, N> {
487488 pub fn nested_obligations ( self ) -> Vec < N > {
488489 match self {
489490 ImplSource :: UserDefined ( i) => i. nested ,
490- ImplSource :: Param ( n) => n,
491+ ImplSource :: Param ( n, _ ) => n,
491492 ImplSource :: Builtin ( i) => i. nested ,
492493 ImplSource :: AutoImpl ( d) => d. nested ,
493494 ImplSource :: Closure ( c) => c. nested ,
@@ -502,7 +503,7 @@ impl<'tcx, N> ImplSource<'tcx, N> {
502503 pub fn borrow_nested_obligations ( & self ) -> & [ N ] {
503504 match & self {
504505 ImplSource :: UserDefined ( i) => & i. nested [ ..] ,
505- ImplSource :: Param ( n) => & n[ ..] ,
506+ ImplSource :: Param ( n, _ ) => & n[ ..] ,
506507 ImplSource :: Builtin ( i) => & i. nested [ ..] ,
507508 ImplSource :: AutoImpl ( d) => & d. nested [ ..] ,
508509 ImplSource :: Closure ( c) => & c. nested [ ..] ,
@@ -524,7 +525,7 @@ impl<'tcx, N> ImplSource<'tcx, N> {
524525 substs : i. substs ,
525526 nested : i. nested . into_iter ( ) . map ( f) . collect ( ) ,
526527 } ) ,
527- ImplSource :: Param ( n) => ImplSource :: Param ( n. into_iter ( ) . map ( f) . collect ( ) ) ,
528+ ImplSource :: Param ( n, ct ) => ImplSource :: Param ( n. into_iter ( ) . map ( f) . collect ( ) , ct ) ,
528529 ImplSource :: Builtin ( i) => ImplSource :: Builtin ( ImplSourceBuiltinData {
529530 nested : i. nested . into_iter ( ) . map ( f) . collect ( ) ,
530531 } ) ,
0 commit comments