Skip to content

Commit 30489a6

Browse files
committed
Remove outdated doc comment
1 parent 747a890 commit 30489a6

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

packages/vm/src/context.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -99,25 +99,6 @@ fn destroy_unmanaged_context_data<S: Storage, Q: Querier>(ptr: *mut c_void) {
9999
}
100100

101101
/// Get a mutable reference to the context's data. Ownership remains in the Context.
102-
// NOTE: This is actually not really implemented safely at the moment. I did this as a
103-
// nicer and less-terrible version of the previous solution to the following issue:
104-
//
105-
// +--->> Go pointer
106-
// |
107-
// Ctx ->> ContextData +-> iterators: Box<dyn Iterator + 'a> --+
108-
// | |
109-
// +-> storage: impl Storage <<------------+
110-
// |
111-
// +-> querier: impl Querier
112-
//
113-
// -> : Ownership
114-
// ->> : Mutable borrow
115-
//
116-
// As you can see, there's a cyclical reference here... changing this function to return the same lifetime as it
117-
// returns (and adjusting a few other functions to only have one lifetime instead of two) triggers an error
118-
// elsewhere where we try to add iterators to the context. That's not legal according to Rust's rules, and it
119-
// complains that we're trying to borrow ctx mutably twice. This needs a better solution because this function
120-
// probably triggers unsoundness.
121102
fn get_context_data_mut<'a, 'b, S: Storage, Q: Querier>(
122103
ctx: &'a mut Ctx,
123104
) -> &'b mut ContextData<S, Q> {

0 commit comments

Comments
 (0)