@@ -701,9 +701,9 @@ impl<'tcx, N> ImplSource<'tcx, N> {
701
701
}
702
702
703
703
pub fn borrow_nested_obligations ( & self ) -> & [ N ] {
704
- match & self {
705
- ImplSource :: UserDefined ( i) => & i. nested [ .. ] ,
706
- ImplSource :: Param ( n, _) => & n,
704
+ match self {
705
+ ImplSource :: UserDefined ( i) => & i. nested ,
706
+ ImplSource :: Param ( n, _) => n,
707
707
ImplSource :: Builtin ( i) => & i. nested ,
708
708
ImplSource :: AutoImpl ( d) => & d. nested ,
709
709
ImplSource :: Closure ( c) => & c. nested ,
@@ -717,6 +717,23 @@ impl<'tcx, N> ImplSource<'tcx, N> {
717
717
}
718
718
}
719
719
720
+ pub fn borrow_nested_obligations_mut ( & mut self ) -> & mut [ N ] {
721
+ match self {
722
+ ImplSource :: UserDefined ( i) => & mut i. nested ,
723
+ ImplSource :: Param ( n, _) => n,
724
+ ImplSource :: Builtin ( i) => & mut i. nested ,
725
+ ImplSource :: AutoImpl ( d) => & mut d. nested ,
726
+ ImplSource :: Closure ( c) => & mut c. nested ,
727
+ ImplSource :: Generator ( c) => & mut c. nested ,
728
+ ImplSource :: Future ( c) => & mut c. nested ,
729
+ ImplSource :: Object ( d) => & mut d. nested ,
730
+ ImplSource :: FnPointer ( d) => & mut d. nested ,
731
+ ImplSource :: TraitAlias ( d) => & mut d. nested ,
732
+ ImplSource :: TraitUpcasting ( d) => & mut d. nested ,
733
+ ImplSource :: ConstDestruct ( i) => & mut i. nested ,
734
+ }
735
+ }
736
+
720
737
pub fn map < M , F > ( self , f : F ) -> ImplSource < ' tcx , M >
721
738
where
722
739
F : FnMut ( N ) -> M ,
0 commit comments