File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ impl BoxedAnyObject {
9898 // rustdoc-stripper-ignore-next
9999 /// Replaces the wrapped value with a new one, returning the old value, without deinitializing either one.
100100 /// The returned value is inside a `Box` and must be manually downcasted if needed.
101+ #[ track_caller]
101102 pub fn replace < T : ' static > ( & self , t : T ) -> Box < dyn Any > {
102103 self . imp ( ) . value . replace ( Box :: new ( t) as Box < dyn Any > )
103104 }
@@ -158,6 +159,7 @@ impl BoxedAnyObject {
158159 ///
159160 /// For a non-panicking variant, use
160161 /// [`try_borrow`](#method.try_borrow).
162+ #[ track_caller]
161163 pub fn borrow < T : ' static > ( & self ) -> Ref < ' _ , T > {
162164 Ref :: map ( self . imp ( ) . value . borrow ( ) , |value| {
163165 value
@@ -180,6 +182,7 @@ impl BoxedAnyObject {
180182 ///
181183 /// For a non-panicking variant, use
182184 /// [`try_borrow_mut`](#method.try_borrow_mut).
185+ #[ track_caller]
183186 pub fn borrow_mut < T : ' static > ( & self ) -> RefMut < ' _ , T > {
184187 RefMut :: map ( self . imp ( ) . value . borrow_mut ( ) , |value| {
185188 value
You can’t perform that action at this time.
0 commit comments