Skip to content

Commit 5ad7849

Browse files
committed
update BuilderArena comment
1 parent 8888443 commit 5ad7849

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

capnp/src/private/arena.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,10 @@ where
155155

156156
pub trait BuilderArena: ReaderArena {
157157
// These methods all take an immutable &self because otherwise a StructBuilder<'a>
158-
// would need a `&'a mut BuilderArena` and `StructBuilder::borrow()` would
159-
// have lifetime issues. (If `'a: 'b`, then a `&'a (BuilderArena + 'a)` can be
160-
// converted to a `&'b (BuilderArena + 'b)`, but a `&'a mut (BuilderArena + 'a)`
161-
// *cannot* be converted to a `&'b mut (BuilderArena + 'b)`. See some discussion here:
158+
// would need a `&'a mut dyn BuilderArena` and `StructBuilder::reborrow()` would
159+
// have lifetime issues. (If `'a: 'b`, then a `&'a dyn (BuilderArena + 'a)` can be
160+
// converted to a `&'b dyn (BuilderArena + 'b)`, but a `&'a mut dyn (BuilderArena + 'a)`
161+
// *cannot* be converted to a `&'b mut dyn (BuilderArena + 'b)`. See some discussion here:
162162
// https://botbot.me/mozilla/rust/2017-01-31/?msg=80228117&page=19 .)
163163
fn allocate(&self, segment_id: u32, amount: WordCount32) -> Option<u32>;
164164
fn allocate_anywhere(&self, amount: u32) -> (SegmentId, u32);

0 commit comments

Comments
 (0)