@@ -697,9 +697,9 @@ impl<'tcx, N> ImplSource<'tcx, N> {
697697 }
698698
699699 pub fn borrow_nested_obligations ( & self ) -> & [ N ] {
700- match & self {
701- ImplSource :: UserDefined ( i) => & i. nested [ .. ] ,
702- ImplSource :: Param ( n, _) => & n,
700+ match self {
701+ ImplSource :: UserDefined ( i) => & i. nested ,
702+ ImplSource :: Param ( n, _) => n,
703703 ImplSource :: Builtin ( i) => & i. nested ,
704704 ImplSource :: AutoImpl ( d) => & d. nested ,
705705 ImplSource :: Closure ( c) => & c. nested ,
@@ -713,6 +713,23 @@ impl<'tcx, N> ImplSource<'tcx, N> {
713713 }
714714 }
715715
716+ pub fn borrow_nested_obligations_mut ( & mut self ) -> & mut [ N ] {
717+ match self {
718+ ImplSource :: UserDefined ( i) => & mut i. nested ,
719+ ImplSource :: Param ( n, _) => n,
720+ ImplSource :: Builtin ( i) => & mut i. nested ,
721+ ImplSource :: AutoImpl ( d) => & mut d. nested ,
722+ ImplSource :: Closure ( c) => & mut c. nested ,
723+ ImplSource :: Generator ( c) => & mut c. nested ,
724+ ImplSource :: Future ( c) => & mut c. nested ,
725+ ImplSource :: Object ( d) => & mut d. nested ,
726+ ImplSource :: FnPointer ( d) => & mut d. nested ,
727+ ImplSource :: TraitAlias ( d) => & mut d. nested ,
728+ ImplSource :: TraitUpcasting ( d) => & mut d. nested ,
729+ ImplSource :: ConstDestruct ( i) => & mut i. nested ,
730+ }
731+ }
732+
716733 pub fn map < M , F > ( self , f : F ) -> ImplSource < ' tcx , M >
717734 where
718735 F : FnMut ( N ) -> M ,
0 commit comments