@@ -701,9 +701,9 @@ impl<'tcx, N> ImplSource<'tcx, N> {
701701 }
702702
703703 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,
707707 ImplSource :: Builtin ( i) => & i. nested ,
708708 ImplSource :: AutoImpl ( d) => & d. nested ,
709709 ImplSource :: Closure ( c) => & c. nested ,
@@ -717,6 +717,23 @@ impl<'tcx, N> ImplSource<'tcx, N> {
717717 }
718718 }
719719
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+
720737 pub fn map < M , F > ( self , f : F ) -> ImplSource < ' tcx , M >
721738 where
722739 F : FnMut ( N ) -> M ,
0 commit comments