@@ -16,6 +16,7 @@ use crate::ty::{self, AdtKind, Ty, TyCtxt};
16
16
use rustc_errors:: { Applicability , DiagnosticBuilder } ;
17
17
use rustc_hir as hir;
18
18
use rustc_hir:: def_id:: DefId ;
19
+ use rustc_hir:: Constness ;
19
20
use rustc_span:: symbol:: Symbol ;
20
21
use rustc_span:: { Span , DUMMY_SP } ;
21
22
use smallvec:: SmallVec ;
@@ -457,7 +458,7 @@ pub enum ImplSource<'tcx, N> {
457
458
/// for some type parameter. The `Vec<N>` represents the
458
459
/// obligations incurred from normalizing the where-clause (if
459
460
/// any).
460
- Param ( Vec < N > ) ,
461
+ Param ( Vec < N > , Constness ) ,
461
462
462
463
/// Virtual calls through an object.
463
464
Object ( ImplSourceObjectData < ' tcx , N > ) ,
@@ -487,7 +488,7 @@ impl<'tcx, N> ImplSource<'tcx, N> {
487
488
pub fn nested_obligations ( self ) -> Vec < N > {
488
489
match self {
489
490
ImplSource :: UserDefined ( i) => i. nested ,
490
- ImplSource :: Param ( n) => n,
491
+ ImplSource :: Param ( n, _ ) => n,
491
492
ImplSource :: Builtin ( i) => i. nested ,
492
493
ImplSource :: AutoImpl ( d) => d. nested ,
493
494
ImplSource :: Closure ( c) => c. nested ,
@@ -502,7 +503,7 @@ impl<'tcx, N> ImplSource<'tcx, N> {
502
503
pub fn borrow_nested_obligations ( & self ) -> & [ N ] {
503
504
match & self {
504
505
ImplSource :: UserDefined ( i) => & i. nested [ ..] ,
505
- ImplSource :: Param ( n) => & n[ ..] ,
506
+ ImplSource :: Param ( n, _ ) => & n[ ..] ,
506
507
ImplSource :: Builtin ( i) => & i. nested [ ..] ,
507
508
ImplSource :: AutoImpl ( d) => & d. nested [ ..] ,
508
509
ImplSource :: Closure ( c) => & c. nested [ ..] ,
@@ -524,7 +525,7 @@ impl<'tcx, N> ImplSource<'tcx, N> {
524
525
substs : i. substs ,
525
526
nested : i. nested . into_iter ( ) . map ( f) . collect ( ) ,
526
527
} ) ,
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 ) ,
528
529
ImplSource :: Builtin ( i) => ImplSource :: Builtin ( ImplSourceBuiltinData {
529
530
nested : i. nested . into_iter ( ) . map ( f) . collect ( ) ,
530
531
} ) ,
0 commit comments